Format Zip Code on report

G

Guest

Hello -
I have a report with a concantnated text box - City, ST Zip. When I set up
the table I used the zip code input mask. I'm trying to remove the trailing
dash from those zip codes that only have 5 digits, but want to keep the dash
for those zips we have the +4 digits for.
Thank you for any help
 
F

fredg

Hello -
I have a report with a concantnated text box - City, ST Zip. When I set up
the table I used the zip code input mask. I'm trying to remove the trailing
dash from those zip codes that only have 5 digits, but want to keep the dash
for those zips we have the +4 digits for.
Thank you for any help

Use an Unbound text control.
Set it's congtrol source to:
=[City] & ", " & [State] & " " & IIf(Len([Zip])>6,[Zip],Left([Zip],5))
 
G

Guest

THANK YOU :) It worked like a charm.

fredg said:
Hello -
I have a report with a concantnated text box - City, ST Zip. When I set up
the table I used the zip code input mask. I'm trying to remove the trailing
dash from those zip codes that only have 5 digits, but want to keep the dash
for those zips we have the +4 digits for.
Thank you for any help

Use an Unbound text control.
Set it's congtrol source to:
=[City] & ", " & [State] & " " & IIf(Len([Zip])>6,[Zip],Left([Zip],5))
 

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

Similar Threads


Top