Results 1 to 3 of 3
  1. #1

    Zip Code merge Access to Word (Office 97 SR-2)

    I have an address database set up in Access, but use Word to generate labels. In the US we have what is called zip+4 making a total of 9 digits. Although most of the entries I have are only 5 digits, Access will accept the 9 digits correctly. I use Word to print the labels because Access does not print a barcode. When printing labels with Word if I have a 9-digit zip code I get an "invalid entry" message in the barcode field. Does Microsoft have a correction for this?
    Thanks for your help.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: Zip Code merge Access to Word (Office 97 SR-2)

    Word accepts 12345-6789, but you must have the hyphen. (<A target="_blank" HREF=>WD97: Error Message in Place of BARCODE Field</A> ) There may be a complicated way to reformat the field during the merge, but you might be better off cleaning up your data.

  3. #3

    Re: Zip Code merge Access to Word (Office 97 SR-2)

    Hi Mary Anna,

    This isn't necessarily a Microsoft problem. The problem lies in how the database is storing (or not storing) the hyphen in the zip codes.

    Does the Access database use an input mask for the Zip+4? If so then you need to determine if the hyphen is being stored with your data or if it is just being used as a format.

    Since the problem is occurring with the 9 digit zip codes, I'd say the hyphen is not being stored and that is the problem. So the zip codes are coming over to Word as 147072301. Since the hyphen is missing the bar code can not be ascertained.

    This is actually easier to correct on the Access side since you are creating mailing labels.

    You'll need to create a query and use it for the data source in Word. For the Zip codes, you'll need to create a field in your query and use it instead of your "normal" zip code field.

    Use something similar to the following for your query:
    Zip: IIf(Len([strZipCode])=9,Format([strZipCode],"00000-0000"),[strZipCode])

    What the above states is, if the length of the zip code field is equal to 9 characters then format the field as zip+4. Otherwise use the content of the zip code field as is.

    Should you receive errors on those zip codes that contain only 5 digits, then the hyphen is the cause of the problem.
    Cheers! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

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