By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,962 Members | 2,545 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,962 IT Pros & Developers. It's quick & easy.

Select Query criteria feeding from subform

P: 2
Hi there,

I have created a form, "search" and a query "search_product". The query returns the product information based upon the criteria for three of the fields, author, title or isbn. The field names on the search form are search_title, search_author and search_isbn. The string entered in the query criteria is:

Like [Forms]![search]![search_author]

This works perfectly. But now I need to take the search form and make it a subform in a form called "main". I edited the query to reflect the new position of the search field;

Like [Forms]![main]![search_subform]![search_author]

Now the query runs (no errors or asking what is contained in the field - when the main form is open in form view BUT it always returns every result from the query - nothing is being filtered.

My question is, why isn't the query working properly once I make the search form a subform and edit the query accordingly??
Sep 15 '06 #1
Share this Question
Share on Google+
3 Replies


PEB
Expert 100+
P: 1,418
PEB
Hi,

try:
Like [Forms]![main]![search_subform].Form!![search_author]

:)

Hi there,

I have created a form, "search" and a query "search_product". The query returns the product information based upon the criteria for three of the fields, author, title or isbn. The field names on the search form are search_title, search_author and search_isbn. The string entered in the query criteria is:

Like [Forms]![search]![search_author]

This works perfectly. But now I need to take the search form and make it a subform in a form called "main". I edited the query to reflect the new position of the search field;

Like [Forms]![main]![search_subform]![search_author]

Now the query runs (no errors or asking what is contained in the field - when the main form is open in form view BUT it always returns every result from the query - nothing is being filtered.

My question is, why isn't the query working properly once I make the search form a subform and edit the query accordingly??
Sep 16 '06 #2

P: 2
I cannot thank you enough PEB!!!! I used [Forms]![main]![search_subform].Form![search_author] (single exclamation mark) and it worked like a charm. Thanks again.

Have a great day!

Hi,

try:
Like [Forms]![main]![search_subform].Form!![search_author]

:)
Sep 18 '06 #3

P: 1
@stevecat
I'm a new user to access and I'm wondering if I'm missing somethign simple here. I have list box in a subform and I want that to control which records I see from a query. I've included some images below and I'm hoping you can help me find where I messed up.


Mar 14 '17 #4

Post your reply

Sign in to post your reply or Sign up for a free account.