Format Zip

M

Mjohnson

I have used an input mask on my form for Zip Code (xxxxx-xxxx). If I only
have a zip 5, it will still display the "-". Is there a way to display just
the zip 5 if no zip 4 exists (without the hyphen)?
 
F

fredg

I have used an input mask on my form for Zip Code (xxxxx-xxxx). If I only
have a zip 5, it will still display the "-". Is there a way to display just
the zip 5 if no zip 4 exists (without the hyphen)?

Something like this?
Using an Unbound control on your report:
=[City] & ", " & [State] & " " & IIf(Len([ZIP])=6,Left([ZIP],5),[ZIP])
 

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