Parameter Querries and Wildcards

E

EscherEnigma

Is there any way to get wildcards to work in a parameter querry? I can get
them to work in normal select querries, but not in parameter ones.

Any help would be appreciated.
 
J

Jeff Boyce

How are you trying to "get them to work" in your parameter query?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John Spencer

They should work.

Field: SomeFIeld
Criteria: Like [Find what?]

If you enter *MA* in response to the prompt you should get all records where
SomeField contains "MA" someplace in the string.

If you want to avoid entering the wildcards, then you will need to concatenate
them onto your response. For instance, the following for a contains search:
Field: SomeField
Criteria: Like "*" & [Find what?] & "*"


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
B

Beep Beep

Hi John:

Is it possible to use this for multiple fields? It works great for one field.

John Spencer said:
They should work.

Field: SomeFIeld
Criteria: Like [Find what?]

If you enter *MA* in response to the prompt you should get all records where
SomeField contains "MA" someplace in the string.

If you want to avoid entering the wildcards, then you will need to concatenate
them onto your response. For instance, the following for a contains search:
Field: SomeField
Criteria: Like "*" & [Find what?] & "*"


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Is there any way to get wildcards to work in a parameter querry? I can get
them to work in normal select querries, but not in parameter ones.

Any help would be appreciated.
 
J

Jeff Boyce

It isn't clear from your question whether you want to use this approach for
the parameter prompts for multiple fields, or if you have multiple fields in
which the value might be found.

If the latter, consider spending some time normalizing your data
structure...

Regards

Jeff Boyce
Microsoft Office/Access MVP

Beep Beep said:
Hi John:

Is it possible to use this for multiple fields? It works great for one
field.

John Spencer said:
They should work.

Field: SomeFIeld
Criteria: Like [Find what?]

If you enter *MA* in response to the prompt you should get all records
where
SomeField contains "MA" someplace in the string.

If you want to avoid entering the wildcards, then you will need to
concatenate
them onto your response. For instance, the following for a contains
search:
Field: SomeField
Criteria: Like "*" & [Find what?] & "*"


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Is there any way to get wildcards to work in a parameter querry? I can
get
them to work in normal select querries, but not in parameter ones.

Any help would be appreciated.
 

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