If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Basic query question about criteria/prompts/wildcards
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..... |
#2
|
|||
|
|||
Basic query question about criteria/prompts/wildcards
your criteria would be...
Like * & [Which City?] & * -- Rick B "LynneMc" wrote in message ... 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..... |
#3
|
|||
|
|||
Basic query question about criteria/prompts/wildcards
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" wrote: your criteria would be... Like * & [Which City?] & * -- Rick B "LynneMc" wrote in message ... 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..... |
#4
|
|||
|
|||
Basic query question about criteria/prompts/wildcards
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" wrote in message ... 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" wrote: your criteria would be... Like * & [Which City?] & * -- Rick B "LynneMc" wrote in message ... 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..... |
#5
|
|||
|
|||
Basic query question about criteria/prompts/wildcards
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" wrote: 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" wrote in message ... 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" wrote: your criteria would be... Like * & [Which City?] & * -- Rick B "LynneMc" wrote in message ... 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..... |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cross tab query construction with Subqueries | Steven Cheng | Running & Setting Up Queries | 7 | February 13th, 2006 06:52 PM |
SQL query showing diff between actual and budget | Bon | Running & Setting Up Queries | 3 | August 25th, 2005 12:07 PM |
Survey Results | SAm | Running & Setting Up Queries | 10 | May 17th, 2005 08:32 PM |
Big number gives error! | Sara Mellen | Running & Setting Up Queries | 8 | October 11th, 2004 02:48 AM |
Taher | Setting Up & Running Reports | 1 | August 31st, 2004 09:07 PM |