Wildcards

M

Matthew

I enter "103*" in the criteria for a field in a query.
The results work fine. When I try to use a prompt
instead, [Enter ref#] as the criteria and
type "103*" in the prompt box, I get no results. Is there
a way to use Wildcards in the "Enter Parameter"
situation? Any help would be much appreciated.
Thankyou, Matthew.
 
R

Rick B

not that I know of. I use something like...


[EnterPartialRef#] & "*"

to accomplish this.

Rick B


I enter "103*" in the criteria for a field in a query.
The results work fine. When I try to use a prompt
instead, [Enter ref#] as the criteria and
type "103*" in the prompt box, I get no results. Is there
a way to use Wildcards in the "Enter Parameter"
situation? Any help would be much appreciated.
Thankyou, Matthew.
 
J

John Vinson

I enter "103*" in the criteria for a field in a query.
The results work fine. When I try to use a prompt
instead, [Enter ref#] as the criteria and
type "103*" in the prompt box, I get no results. Is there
a way to use Wildcards in the "Enter Parameter"
situation? Any help would be much appreciated.
Thankyou, Matthew.

Use a criterion of

LIKE [Enter ref#]

By default Access uses the = operator which ignores wildcards; the
LIKE operator recognizes them.
 
R

Rick B

oops! John is correct. I shoulda gone and looked at my database insteada
of going off of memory. I still do...

Like [EnterRef#] & "*"

the reason I do that is incase the user wants all records, they can simply
leave the prompt blank and it will uset the like * criteria to
return all records. Not sure if you need that in your example.

Rick B



I enter "103*" in the criteria for a field in a query.
The results work fine. When I try to use a prompt
instead, [Enter ref#] as the criteria and
type "103*" in the prompt box, I get no results. Is there
a way to use Wildcards in the "Enter Parameter"
situation? Any help would be much appreciated.
Thankyou, Matthew.

Use a criterion of

LIKE [Enter ref#]

By default Access uses the = operator which ignores wildcards; the
LIKE operator recognizes them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top