Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

zip code format

0 views
Skip to first unread message

Sharon

unread,
Sep 30, 2003, 12:02:50 PM9/30/03
to
I'm using the following function to format imported zip
codes without a dash.

zipcode: Left([address_mailing_zip],5) & "-" & Right
([address_mailing_zip],5)

What do I need to do if a zip code has a 0 as the last
number or the 6th number. Using 4 for the right function
deletes the front 0. Using 5 for the right function adds
the last digit on the first 5 characters.

30068-0023
30068-2300

Gina Whipp

unread,
Sep 30, 2003, 1:50:24 PM9/30/03
to
Perhaps the below code will do what you need? Access drops the zero if the
field they are being 'dropped' to is numeric. (Or you could switch to a
text field?)

zipcode: IIf([address_mailing_zip] Like
"#####-",Left([address_mailing_zip],5),[address_mailing_zip])

"Sharon" <pdm...@comcast.net> wrote in message
news:0cfb01c3876c$4c2affd0$a001...@phx.gbl...

0 new messages