queries and subforms
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

Queries and subforms

resolvedResolved · Urgent Priority · Version 2003

replyReply Thu 16 Oct 2008, 14:39Delegate Anna said...

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?

For upcoming training course dates see: Pricing & availability

replyReply Mon 20 Oct 2008, 15:59Trainer Stephen said...

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

replyReply Thu 23 Oct 2008, 16:31Delegate Anna said...

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

 

Please browse our web site to find out more about
ms+access+courses and other Microsoft training courses.

Access tip:

Zoom feature for queries

If youare working on on query design and creating a calculated field, it can be hard to view the whole statement. You can hold the shift key down and press F2, to show the zoomed up version of the query field

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard