Basic query question about criteria/prompts/wildcards

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

Guest

Hi. I have a very basic query question...

I have my query set up using the wizard, but I can't figure out how to
properly set the 'criteria'. I set up a prompt for the user to enter the
criteria, but the user input will never be exactly what is in that field. I
have tried using wildcards in the response to the prompt, but this returns me
no data every time. Is there a way I can format the response to the prompt
so that it will search for that string of text, and return all those items
with that string? For example, if the criteria prompt associated with the
city field asked "which city" then the user enetered "los" it would return
Los Angeles, Los Gatos, etc., etc.

Thanks for any help.....
 
Thank you Rick, but it isn't quite working....the system puts in quotes like
this:
Like "*" & [Which City?] & "*"
but I always get no results, even when my input exactly matches something in
that field (i have tried moving the quotes around but no luck). I realize
this may be due to the way I originally set this database up (really don't
know what I am doing.)
I get the answer I want when I put
Like "*los*"
Into the criteria field. But I need this to be promt/input.

Any suggestions?

Rick B said:
your criteria would be...


Like * & [Which City?] & *




--
Rick B



LynneMc said:
Hi. I have a very basic query question...

I have my query set up using the wizard, but I can't figure out how to
properly set the 'criteria'. I set up a prompt for the user to enter the
criteria, but the user input will never be exactly what is in that field.
I
have tried using wildcards in the response to the prompt, but this returns
me
no data every time. Is there a way I can format the response to the
prompt
so that it will search for that string of text, and return all those items
with that string? For example, if the criteria prompt associated with the
city field asked "which city" then the user enetered "los" it would return
Los Angeles, Los Gatos, etc., etc.

Thanks for any help.....
 
The quotes it put in is correct.

It should look just like you put below: Like "*" & [Which City?] & "*"

When the prompt comes up you type los

and you get no results?

On my test database this works just fine.

I also coded it to allow "blank for all" and it works as well. That would
look like...

Like "*" & [Enter String (blank for all):] & "*" And Like "*"


This is a text field you are using? Is there any other criteria in your
query?

Please post the sql view of your query.


--
Rick B



LynneMc said:
Thank you Rick, but it isn't quite working....the system puts in quotes
like
this:
Like "*" & [Which City?] & "*"
but I always get no results, even when my input exactly matches something
in
that field (i have tried moving the quotes around but no luck). I realize
this may be due to the way I originally set this database up (really don't
know what I am doing.)
I get the answer I want when I put
Like "*los*"
Into the criteria field. But I need this to be promt/input.

Any suggestions?

Rick B said:
your criteria would be...


Like * & [Which City?] & *




--
Rick B



LynneMc said:
Hi. I have a very basic query question...

I have my query set up using the wizard, but I can't figure out how to
properly set the 'criteria'. I set up a prompt for the user to enter
the
criteria, but the user input will never be exactly what is in that
field.
I
have tried using wildcards in the response to the prompt, but this
returns
me
no data every time. Is there a way I can format the response to the
prompt
so that it will search for that string of text, and return all those
items
with that string? For example, if the criteria prompt associated with
the
city field asked "which city" then the user enetered "los" it would
return
Los Angeles, Los Gatos, etc., etc.

Thanks for any help.....
 
Yes I was getting no results with the original one......but for whatever
reason, it works with your "blank for all", and gives me the results I want.
Thank you so much for the help!!!

Rick B said:
The quotes it put in is correct.

It should look just like you put below: Like "*" & [Which City?] & "*"

When the prompt comes up you type los

and you get no results?

On my test database this works just fine.

I also coded it to allow "blank for all" and it works as well. That would
look like...

Like "*" & [Enter String (blank for all):] & "*" And Like "*"


This is a text field you are using? Is there any other criteria in your
query?

Please post the sql view of your query.


--
Rick B



LynneMc said:
Thank you Rick, but it isn't quite working....the system puts in quotes
like
this:
Like "*" & [Which City?] & "*"
but I always get no results, even when my input exactly matches something
in
that field (i have tried moving the quotes around but no luck). I realize
this may be due to the way I originally set this database up (really don't
know what I am doing.)
I get the answer I want when I put
Like "*los*"
Into the criteria field. But I need this to be promt/input.

Any suggestions?

Rick B said:
your criteria would be...


Like * & [Which City?] & *




--
Rick B



Hi. I have a very basic query question...

I have my query set up using the wizard, but I can't figure out how to
properly set the 'criteria'. I set up a prompt for the user to enter
the
criteria, but the user input will never be exactly what is in that
field.
I
have tried using wildcards in the response to the prompt, but this
returns
me
no data every time. Is there a way I can format the response to the
prompt
so that it will search for that string of text, and return all those
items
with that string? For example, if the criteria prompt associated with
the
city field asked "which city" then the user enetered "los" it would
return
Los Angeles, Los Gatos, etc., etc.

Thanks for any help.....
 
Back
Top