Using a wildcard in a QUERY

K

kealaz

I am using [Enter Drawing Number:] in a query so that when the query is run,
the user is asked to enter a drawing number. Right now, if the user is
looking for 12345-A and only enters the number 12345, there is no results
given because Access does not find a match. I would like to make it so that
12345-A comes up if just the number is entered.

I have tried

[Enter Drawing Number:]*

and

[Enter Drawing Number:]"*"

both of which gives me a syntax error.



I have also tried

[Enter Drawing Number:] + "*"

which does not give me a syntax error, but when I run the query, I get no
results, which means it's not working.

Can anyone help me out here?

Thanks a bunch!!!
 
K

kealaz

Hi Joan,

Thank you so much for replying to my question. I tried this, and thought
(hoped) it would work, but it didn't. When I enter a number (ie. 12345
without the rev letter -A), it still comes up with an empty record, meaning
it didn't find a match.

Please help! Thank you so much for your generous time.
 
T

TedMi

LIKE [Enter Drawing Number:] & "*"
TedMi


kealaz said:
Hi Joan,

Thank you so much for replying to my question. I tried this, and thought
(hoped) it would work, but it didn't. When I enter a number (ie. 12345
without the rev letter -A), it still comes up with an empty record,
meaning
it didn't find a match.

Please help! Thank you so much for your generous time.



Joan Wild said:
[Enter Drawing Number:] & "*"

Joan Wild
MS Access MVP
 

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