469,344 Members | 6,281 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,344 developers. It's quick & easy.

Select Query criteria feeding from subform

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
3 8751
PEB
1,418 Expert 1GB
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
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
@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.

Similar topics

4 posts views Thread by Therese A. Sorna | last post: by
3 posts views Thread by cassandra.flowers | last post: by
7 posts views Thread by keliie | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.