Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referring a query field (w/Like operator) to a text box in a form

Status
Not open for further replies.

siouxsiez

Technical User
Dec 20, 2005
6
US
Hi,

I have created a form where a user can choose from any of 3 combo boxes that run an instant Select query. I want to add two more search options, but make them using text boxes rather than combo boxes. For example, I have a field "author list" that contains one or multiple authors per record. I want the user to be able to pull up all records that contain any last name they enter into the text box. I have the following under the criteria for "author list" in the query:


Like "*[Forms]![frmQuickView]![author]*"

where "author" refers to the text box field in the form. However, no amount of tinkering with the quotes and asterixes and brackets returns anything but all the records (leaving the combo boxes blank, since they actually work). I can't find any info on dealing with this kind of parameter query that allows it to be entered on a form shared with other combo boxes (seems like I have to let it be a regular parameter query with the pop-up asking for a parameter for one field, but that's not what I want). Can anyone offer advice?

Best,
sioux
 
Like "*" & [Forms]![frmQuickView]![author] & "*"

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks, Duane, but I tried that and it didn't work. I'm still at a loss. is there any other information I should be giving that might help?

s
 
Never mind, it works! I think I filled the query with too much junk playing with allowing null values. When I made it all over again, no problem! Thanks!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top