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

I am trying to build a query form t

Status
Not open for further replies.

cynaptic

Programmer
Sep 13, 2001
54
0
0
GB
I am trying to build a query form that searches for a close match, am using the following code, it pops up the parameter prompt but doesn't return any results....

SELECT *
FROM CompanyContacts
WHERE CompanyName LIKE Forms![CompanyContacts]![CompanySearch];
 
If you aren't using a wildcard
SELECT *
FROM CompanyContacts
WHERE CompanyName LIKE Forms![CompanyContacts]![CompanySearch] & "*";

and don't spell or use the correct case it will not return any results. Try that and see if it works!

 
Thanks NinaBunny

it works to a degree....

now i get all of the records and no parameter prompt.

help......
 
scrap that last - works like a charm. one question though, the * is a wild card for the remainder of the field. how would I introduce a wildcard for the begining of the feild as well i.e. *foo*? As you have probably gathered - I ain't no VB programing wizard....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top