Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to search for the first part of post code using parameter Query

Status
Not open for further replies.

Husameddin

Technical User
Mar 4, 2003
17
GB
hello guys

I am using Access office 2000 and I want to set up a parameter query to search for the first part of any post code, the post code is written like (W2 4JL) and I want when I enter the first part of the post code (W2) be able to get the whole post code, I want to use parameter and I don’t know any thing about SQL ……is there any simple query can do this please help. Hope I explained my question enough
thank you

 
Paste this SQL into a new queryies SQL window and save. Update the red code with the appropriate table name:

Select A.*
FROM tblYourTableName as A
WHERE Mid$(A.PostCode,1,2) = [Enter 1st two digits of postcode: ];

Let me know how this works for you.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top