Like criterea in query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query that I request from the user input to use as a criteria. If
the user enters nothing the query will not work, but if I have the user use a
wild card * it will pull up the records.

I don't want the user to have to use a * I want a simple enter key to be
treated the same.

Thanks,
 
It makes sense once your pointed in the right direction. Works as expected.
Thank You

Brian Bastl said:
try Like "*" & [Enter a Category] & "*"

HTH,
Brian


stickandrock said:
Criteria line is....

Like [Enter a Catergory]


Brian Bastl said:
What is the exact SQL for your query?

Brian

I have a query that I request from the user input to use as a criteria.
If
the user enters nothing the query will not work, but if I have the user
use a
wild card * it will pull up the records.

I don't want the user to have to use a * I want a simple enter key to be
treated the same.

Thanks,
 
You're welcome.


stickandrock said:
It makes sense once your pointed in the right direction. Works as expected.
Thank You

Brian Bastl said:
try Like "*" & [Enter a Category] & "*"

HTH,
Brian


stickandrock said:
Criteria line is....

Like [Enter a Catergory]


:

What is the exact SQL for your query?

Brian

I have a query that I request from the user input to use as a criteria.
If
the user enters nothing the query will not work, but if I have the user
use a
wild card * it will pull up the records.

I don't want the user to have to use a * I want a simple enter key
to
be
treated the same.

Thanks,
 
An alternative,

Like NZ([Enter a Category],"*")

It makes sense once your pointed in the right direction. Works as expected.
Thank You

Brian Bastl said:
try Like "*" & [Enter a Category] & "*"

HTH,
Brian


stickandrock said:
Criteria line is....

Like [Enter a Catergory]


:

What is the exact SQL for your query?

Brian

I have a query that I request from the user input to use as a criteria.
If
the user enters nothing the query will not work, but if I have the user
use a
wild card * it will pull up the records.

I don't want the user to have to use a * I want a simple enter key to be
treated the same.

Thanks,
 
Back
Top