queries and subforms

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Queries and subforms

Queries and subforms

resolvedResolved · Urgent Priority · Version 2003

Anna has attended:
Access Intermediate course
Access Advanced course
Access VBA course

Queries and subforms

i have a subform that i wish to run a query on (finding a record based on user input) how do i do that without opening the subform as a separate form?

RE: queries and subforms

Hi Anna

Thank you for your question

Queries need to be run on underlying tables rather than forms which merley display data.

I would suggest identifying the table or query which underlies the subform and then building a query based on that. You can then display that query in a seperate form

Hope this helps

If not please get back to me

Regards

Stephen

RE: queries and subforms

Hi Stephen,

Yes, sorry i worded the questions badly.

I have a subform form based on a query. i am trying to filter the records. When i open the form as a form the filter works perfectly but when i open it as the subform it won't work. i have tried:

me.docmd.applyfilter "qrySearchEmpName"

i get "Method or data member not found" in response

I have also tried:

frmEmployee.docmd.applyfilter "qrySearchEmpName"

i get "run-time error - object required" in response.

The code is attached to a button on the subform.

Thanks for your help.

Regards,
Anna


 

Access tip:

Insert The Current Date

To insert the current date into a Table field or Form Text box use:

Ctrl+Semi-Colon(;)

View all Access hints and tips


Server loaded in 0.1 secs.