zip code in label

H

Hermie

Hello
In my label query the zipcode looks like 00969-7659 In the labelreport it
shows 009697659 How can I show the - sign in the report? I tried
Format([zip],"00000""-9999""")) but this not works Any idea how to do?

Hermie
 
F

fredg

Hello
In my label query the zipcode looks like 00969-7659 In the labelreport it
shows 009697659 How can I show the - sign in the report? I tried
Format([zip],"00000""-9999""")) but this not works Any idea how to do?

Hermie

Use an UNBOUND text control.

=IIf (Len([ZIP])>=9,Left([ZIP],5) & "-" &
Right([ZIP],4),Left([ZIP],5))

12345 or 12345- will print 12345
123456789 or 12345-6789 will print 12345-6789
 
H

Hermie

Thx Fred works perfect


fredg said:
Hello
In my label query the zipcode looks like 00969-7659 In the labelreport it
shows 009697659 How can I show the - sign in the report? I tried
Format([zip],"00000""-9999""")) but this not works Any idea how to do?

Hermie

Use an UNBOUND text control.

=IIf (Len([ZIP])>=9,Left([ZIP],5) & "-" &
Right([ZIP],4),Left([ZIP],5))

12345 or 12345- will print 12345
123456789 or 12345-6789 will print 12345-6789
 

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