access report:zip code 5, 9

B

beth

I have a combined value text box for City, St Zip. It doesn't display the -
in those with 9 digits. They are saved in the table WITH the dash. How can I
get the dash to display, or is the combined text value box the problem?
 
J

John Spencer

As a guess they are not saved with the dash. You are seeing the dash because
there is a display format being applied when you look at the ZIP field.

And yes the combined text value box is probably causing the problem.

Try the following expression in place of your current expression.
[City] & ", " & [State] & IIF(Len([Zip])=9,Format([Zip],"00000-0000"),[Zip])



John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
B

beth

It worked - you're a god Thank you sooooo much - beth

John Spencer said:
As a guess they are not saved with the dash. You are seeing the dash because
there is a display format being applied when you look at the ZIP field.

And yes the combined text value box is probably causing the problem.

Try the following expression in place of your current expression.
[City] & ", " & [State] & IIF(Len([Zip])=9,Format([Zip],"00000-0000"),[Zip])



John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
I have a combined value text box for City, St Zip. It doesn't display the -
in those with 9 digits. They are saved in the table WITH the dash. How can I
get the dash to display, or is the combined text value box the problem?
 

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