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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Like * * ? 2

Status
Not open for further replies.

mrdod

Technical User
Jun 12, 2006
103
US
I'm trying to query some chemical records based on the user typing in what he/she thinks is the name of a product. I created a simple query but it's not returning any results when I use the following statement. I'm sure it's something simple but obviously I'm not sure what. This is some low hanging fruit for someone to pluck.

Like "*Form!frmlookup!tbname*
 
Probably should be:

Like "*" & Form!frmlookup!tbname & "*"

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Still not working. It's asking me for a parameter value. The form is called frmlookup and the text box is called tbname. Any other suggestions?

 
I tested the following:

Code:
SELECT Table6.thedate
FROM Table6
WHERE (((Table6.thedate) Like "*" & [forms]![form1]![text1] & "*"));

which worked as expected. Can you post your SQL for the query ??

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 

Robert missed the "s" from the Form!frmlookup!tbname in his first post and you got the proper reaction from access.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top