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!

Display record field as zip code 1

Status
Not open for further replies.

paul123456

Technical User
Apr 29, 2002
518
US
Hi..my data on the table for the zip code is not formated as a zip. the reason being is because i also use a bar code font on some reports which is not allowed to include the dash in the zip code.. but now with just having the zip code as a text field my problem is in my reports that the zip just reads as a number with no dash..is there some kind of code i can put in the field to include a dash after every 5th character and then resume with the last 4 characters if present? if i change the table field for the zip so that it is in zip code format it does not affect my reports?? what can i do??

Thanks, PAUL

 
Try:
=Left([ZipCode],5) & IIf(Len([ZipCode])>5,"-" & Mid([ZipCode],6),"")

Duane
MS Access MVP
 
Thank you...works great...thnx again

Thanks, PAUL

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top