Format Zip Code

allredkj

Registered User.
Local time
Today, 17:46
Joined
Jul 25, 2012
Messages
20
I have a table where the zipcode holds 9 characters. I would like to perform an update query to add any leading zeros to the first set of 5 characters and then produce output including a dash: 99999-9999.

I tried this, but getting "undefined function in expression" error:
Update to: Format([ZIP],"00000-0000")

I also tried this and same error:
Update To: Format([ZIP],"@@@@@-@@@@")

Can you assist?
 
You can either set the formatting at table level by simply inserting 0000-0000

attachment.php


Our you can set it at Form level.

attachment.php
 

Attachments

  • Capture2.JPG
    Capture2.JPG
    37.2 KB · Views: 1,684
  • Capture.JPG
    Capture.JPG
    28.4 KB · Views: 1,892
You may have a references problem. Has the database been converted from another version?

BTW Format doesn't work like that unless the characters are all numeric.
 

Users who are viewing this thread

Back
Top Bottom