Inputing various answers into a Query Prompt.

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

Guest

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.
 
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
 
YES!!!!!!!!!!! It worked!!!! Thank you so much. I didn't know how to use the
wildcard correctly, but thank you for the advice

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
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.
 

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

Back
Top