displaying zips in access 2003

G

Guest

How do you force a leading zero to be displayed for zip codes in both the
table and form for ACCESS 2003?
 
D

Dirk Goldgar

Ralph said:
How do you force a leading zero to be displayed for zip codes in both
the table and form for ACCESS 2003?

Make the field a text field. If you already have numbers in that field
from which the leading zeros have been dropped, run an update query to
put them back; e.g.,

UPDATE YourTable
SET YourTextField = Format(YourTextField, "00000");

**NOTE: That assumes that you only have five-digit zip codes. If you
have a mix of 5-digit and 9-digit codes, it's more complicated.
 
G

Guest

Thanks

Dirk Goldgar said:
Make the field a text field. If you already have numbers in that field
from which the leading zeros have been dropped, run an update query to
put them back; e.g.,

UPDATE YourTable
SET YourTextField = Format(YourTextField, "00000");

**NOTE: That assumes that you only have five-digit zip codes. If you
have a mix of 5-digit and 9-digit codes, it's more complicated.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

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