Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Labels in Access 1

Status
Not open for further replies.

crowee

Technical User
May 17, 2001
24
US
Thank you for the info on the code for zip codes.
When I do a report for labels and print them the zip code runs together its not separated by a (-). I had the code in correctly from the start. On any other kind of report it comes out correct, its only in the label report.
ie. correct zip code 17404-1122, the way my report prints it 174041122. Help!!!!
 
In your report, under the control properties, there is a format property. I think if you put something like 00000-9999;; in there, that should do it.

HTH :) Holy tek-tips batman!:-0
 
I have that code in there now and it is still printing wrong.. grrrr. I have tried almost everything.
 
I can print out any other report and the zip codes print fine its only when I do labels. <stumped> X-)
 
This isn't the prettiest solution, but if you need to get the report out, how about using the string:
=LEFT([ZIP CODE],5) & &quot;-&quot; & RIGHT([ZIP CODE],4)
as the control source rather than simply [zip code].
 
I am going to assume you have either 5 digit zip or 9 digit zip. So you need to change the control source of the zipcode field to an iif statement that formats one way for a 5 digit and another for a 9 digit. Here's the statement:

[tt]
=IIf(Len([ZipCode])=5,format([ZipCode],&quot;00000&quot;),format([ZipCode],&quot;00000-0000&quot;))
[/tt]

Make sure that the control holding the ZipCode is named something different than the field name. The wizard automatically uses the field name as the control name and this would cause this function to not work (#Error).

HTH
Joe Miller
joe.miller@flotech.net
 
Do you have an imput mask on the data in the table where the info is coming from? Or do you format it only in the reports?

Shot in the dark. I don't know if it will carry the formatting over or not. I hate making labels in access.

HTH! Holy tek-tips batman!:-0
 
I have an input masked in the table and then I am pulling the info from a qry.

I am not sure how to format the report itself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top