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