A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Inputing various answers into a Query Prompt.



 
 
Thread Tools Display Modes
  #1  
Old February 9th, 2007, 11:00 PM posted to microsoft.public.access.queries
ChristineN.
external usenet poster
 
Posts: 1
Default Inputing various answers into a Query Prompt.

I would like to be able to put a criteria into the query which when prompted,
will allow me to input data that is not exactly the same as the data in the
table, but still look up the value. For example, in my table I have some
values that say Oatmeal, Oatbran, and Oat. I want to be able to just type
"oat" into the prompt and have it display all values that have "oat" in it.
I do not want to use a wildcard query because there is a long list of other
items I want to look up and I do not want to think of every possible
combination of letters and make queries out of them. Anyone know how to do
this?

For example, I do not want to make a query for "oa", then "oat", then all of
the other combinations for all other types of food I have.
  #2  
Old February 10th, 2007, 03:29 AM posted to microsoft.public.access.queries
[email protected]
external usenet poster
 
Posts: 32
Default Inputing various answers into a Query Prompt.

I am somewhat confused by your question - it doesn't make sense why
not to use wildcards - you need to for this kind of query. The
question is how to use them.

For your query under the field you want to search - let's call it
"Product" enter this in the criteria line:

Like "*"&[Please enter all or part of a product name:]&"*"

This will prompt the user to enter any part of the product name. So if
they enter OAT, they will get resuls like

Oat
OatBran
Lots of Oats
Big Oat
Oatmeal
Boats

If you ony want the prompt to be the start of the product name, just
exclude the first wildcard:

Like [Please enter all or part of a product name:]&"*"


This will result in:

Oatmeal
Oatbran
Oat Flakes
Oats
Oat


I can't think of any other way to do it...

Diane
On Feb 9, 3:00 pm, ChristineN.
wrote:
I would like to be able to put a criteria into the query which when prompted,
will allow me to input data that is not exactly the same as the data in the
table, but still look up the value. For example, in my table I have some
values that say Oatmeal, Oatbran, and Oat. I want to be able to just type
"oat" into the prompt and have it display all values that have "oat" in it.
I do not want to use a wildcard query because there is a long list of other
items I want to look up and I do not want to think of every possible
combination of letters and make queries out of them. Anyone know how to do
this?

For example, I do not want to make a query for "oa", then "oat", then all of
the other combinations for all other types of food I have.



  #3  
Old February 12th, 2007, 08:41 PM posted to microsoft.public.access.queries
ChristineN.
external usenet poster
 
Posts: 2
Default Inputing various answers into a Query Prompt.

YES!!!!!!!!!!! It worked!!!! Thank you so much. I didn't know how to use the
wildcard correctly, but thank you for the advice

" wrote:

I am somewhat confused by your question - it doesn't make sense why
not to use wildcards - you need to for this kind of query. The
question is how to use them.

For your query under the field you want to search - let's call it
"Product" enter this in the criteria line:

Like "*"&[Please enter all or part of a product name:]&"*"

This will prompt the user to enter any part of the product name. So if
they enter OAT, they will get resuls like

Oat
OatBran
Lots of Oats
Big Oat
Oatmeal
Boats

If you ony want the prompt to be the start of the product name, just
exclude the first wildcard:

Like [Please enter all or part of a product name:]&"*"


This will result in:

Oatmeal
Oatbran
Oat Flakes
Oats
Oat


I can't think of any other way to do it...

Diane
On Feb 9, 3:00 pm, ChristineN.
wrote:
I would like to be able to put a criteria into the query which when prompted,
will allow me to input data that is not exactly the same as the data in the
table, but still look up the value. For example, in my table I have some
values that say Oatmeal, Oatbran, and Oat. I want to be able to just type
"oat" into the prompt and have it display all values that have "oat" in it.
I do not want to use a wildcard query because there is a long list of other
items I want to look up and I do not want to think of every possible
combination of letters and make queries out of them. Anyone know how to do
this?

For example, I do not want to make a query for "oa", then "oat", then all of
the other combinations for all other types of food I have.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.