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

Simple Query Not Working

Status
Not open for further replies.

SimRick

Technical User
May 2, 2001
21
US
The parameter query looks like this:

SELECT [Orientation and Med Course].Name, [Orientation and Med Course].[Class Name]
FROM [Orientation and Med Course]
WHERE ((([Orientation and Med Course].[Class Name]) Like [Please Enter A Class Name]));

I can see the results I want when I filter by form, but this query won't return any results. I am using it in a more advanced query so I don't want to save the filter as a query. What am I not seeing?
 
If you have an exact class name then use = otherwise the "Like" normally needs the wildcard character *.

Like "*classname*"
 
Thanks... I have an exact class name, they are actually quite simple, like "module #1". I even copied and pasted the name directly from the table to make sure. If I remove the parameter from the query, it shows all results.
 
The = should work for you.

This is a case where the data is causing the problem with the like clause.

The # is a special mask character.

enter like this module [#]1 if you want to use special characters in the data. The [] tells access that it is data not a mask character.
 
Right You Are! I just learned a valuable lesson. Thank you very much for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top