zip code in label

  • Thread starter Thread starter Hermie
  • Start date Start date
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
 
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
 
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
 
Back
Top