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

queries and subforms

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

Queries and subforms

ResolvedVersion 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

 

Training courses

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Access tip:

Choosing data types in Access

Not sure which data type to use for your Access fields? Here are some guidelines to help you choose a data type to assign to a field.

- The Text data type can accept up to 255 characters. For information that will be recorded in paragraphs, use Memo.

- Also use Text for numbers that aren't going to be used in calculations, e.g. phone numbers.

- Use the Currency data type for monetary amounts.

- Use Date/Time for dates.

- Most other numbers can use the Number data type, but the Field Size property may have to be altered.

- For fields that have only two alternatives (yes, no) use Yes/No data type. If there is likely to be a third entry option (e.g. maybe or don't know) use Text instead.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.