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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Truncating a 9 digit postal code to a 5 digit code 2

Status
Not open for further replies.

iblueit

Technical User
Feb 18, 2004
5
US
I am relatively new to MS Access. I have a table in Access that has addresses, including postal codes(5 and 9 digit). I also have a table containing 5 digit postal codes and the county to which it belongs. How do I arrange it so that the I can determine which county a particular address belongs who's postal code is an undetermined length.

I have looked in the FAQs and through other postings but I just don't know proper terminology to accomplish what I want.

Thanks in advance for any help you may offer.

blu


There are 10 types of people in the world.
Those who understand binary and those who don't.
 
Left([Postal Code],5) will return the first five characters.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Are you in the UK ?
Are you refering to UK Post Codes ?
Are you meaning the OutBound section of the PostCode ( The part before the space character ) by what you call the 5Char Postcode ?

If so you can get the Outbound part from the whole postcode using

strOutPart = Left(txtPostCode,Instr(txtPostCode," "))


does-that-'elp ?



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Thanks for the help. I actually am a yankee. Just tring to get ridd of the 4 digit extention on the zip code, but figured use "postal" would be more generic.

Thanks again for the help.

Blu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top