Using Wildcard Characters

Number Six

Number Six
Local time
Today, 08:16
Joined
Jun 24, 2005
Messages
14
I have several queries looking up products from a table. I use a simple form to access the query and in the criteria of the field I use [Forms]![EnterCroft]![ProductName] to filter by name. (EnterCroft is the name of the form).

It works fine but doesn't like the asterisk (*) for all products.

I also want to use wildcard before and after key words in the product names, eg *cup* for anything with CUP in it's name.

How can I do this?

Thank you very much.
 
You should search the forum for wildcards, but I think that you merely need to precede your criteria with the function Like.
Like [Forms]![EnterCroft]![ProductName]

Brian
 
Six,

Assuming that you have the [ProductName] field in your query, and
that it's criteria is set to =[Forms]![EnterCroft]![ProductName]

To add support for the "*"

Add a new column to your query:

NewColumn: [Forms]![EnterCroft]![ProductName]

Then, in the Criteria "Or" line, put = "*"

So, if the combo name matches, return the row OR
if the combo has "*", return All rows.

Wayne
 

Users who are viewing this thread

Back
Top Bottom