Format Zip

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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)?
 
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])
 
Back
Top