Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2011
    Posts
    11

    Unanswered: Separate zip+4 with dash in label report

    My db with patient information has an input mask for the zip code field XXXXX-XXXX. When I'm importing the info from a query into "rptLevel3_Mailer", I am coming up with all 9 numbers in the zip field without the dash. What is the easiest way to get the dash in the label report without changing the field in the table itself. The labels are pulling from "qryLevel3_Mailer".

    Thank you!


  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You can use the Format() function. e.g.:
    Code:
    Format("111111111","00000-0000")
    yields 11111-1111
    Have a nice day!

  3. #3
    Join Date
    Jun 2011
    Posts
    11

    Still confused...

    Sorry for the delay in response, this was put on the back burner and now I'm looking at it again. Where does the format go? I have the city, state, zip set up as such in the labels report:

    =Trim([City] & ", " & [State] & " " & [Zip])

    Will I need to separate the zip from the city and the state in order to be able to put in the format?

    I've included a screen shot of how it's set up now.

    Thanks again!
    Attached Thumbnails Attached Thumbnails Labels.jpg  

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Then it should be:
    Code:
    =Trim([City] & ", " & [State] & " " & Format([Zip],"00000-0000"))
    If [zip] can be Null, use:
    Code:
    =Trim([City] & ", " & [State] & " " & Format(Nz([Zip],""),"00000-0000"))
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •