Like and Access

A

Arturo Guzman

Hello,

I have a postal code field, when I run the query to ask the user which
postal code want to view.

I need to use like now, so if If the user wants all the postal codes
which begins in 17, Selec * from PostalCodes where "[PostalCode]*"
doesn´t work, what is the way to do it in access.

Thanks for your replies.
 
R

Rick Brandt

Arturo said:
Hello,

I have a postal code field, when I run the query to ask the user which
postal code want to view.

I need to use like now, so if If the user wants all the postal codes
which begins in 17, Selec * from PostalCodes where "[PostalCode]*"
doesn´t work, what is the way to do it in access.

Thanks for your replies.

I can't think of any database where the characters you're looking for don't
need to be included in your SQL statement (you don't even have the word
"Like" in there). Try..

Select * from PostalCodes where PostalCode Like "17*"
 
F

fredg

Hello,

I have a postal code field, when I run the query to ask the user which
postal code want to view.

I need to use like now, so if If the user wants all the postal codes
which begins in 17, Selec * from PostalCodes where "[PostalCode]*"
doesn´t work, what is the way to do it in access.

Thanks for your replies.

Answered elsewhere.
Please do not multi-post. If you feel you must post the same question
to more than one newsgroup (and it's seldom necessary), cross-post by
adding each additional newsgroup in the To Newsgroups: box, separated
by a comma.
This way an answer in one newsgroup will be seen in each of the
others. More readers will see the response and learn, and less time
will be spent on duplicate answers.

See Netiquette at http://www.mvps.org/access

It's a great site to visit anyway.
 

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