Merging text fields

C

compunow

Hello,

I imported my mail list from a text delimited file into access 2000. This
has over 7,000 records. My problem is my zip code fields are separated into
two different fields ex: Field113 has 11501 and Field114 has 2232. I need to
merge these two text fields so the out come will be: 11501-2232 then I can
generate my barcodes in word mail merge.

If any one know how to.

pls help.
thanks
 
J

John Nurick

Are the two fields Text fields or Number fields?

If they're text fields, you can combine them on the fly by using a query
to provide the data for the mailmerge. Use a calculated field like this
in the query:

Zip: [Field113] & IIF(IsNull([Field114]), "", "-" & [Field114])

If they're number fields, you may need to use something like this
instead:

Zip: Format([Field113],"00000") & IIF(IsNull([Field114]), "", "-" &
Format([Field114],"0000")

To combine them into a single field permanently, add a 10-character Text
field to the table and use an expression like those above to generate
the zip codes in an update query. When this has run satisfactorily,
delete the two original fields.
 
C

compunow

Thank you for your help.
John Nurick said:
Are the two fields Text fields or Number fields?

If they're text fields, you can combine them on the fly by using a query
to provide the data for the mailmerge. Use a calculated field like this
in the query:

Zip: [Field113] & IIF(IsNull([Field114]), "", "-" & [Field114])

If they're number fields, you may need to use something like this
instead:

Zip: Format([Field113],"00000") & IIF(IsNull([Field114]), "", "-" &
Format([Field114],"0000")

To combine them into a single field permanently, add a 10-character Text
field to the table and use an expression like those above to generate
the zip codes in an update query. When this has run satisfactorily,
delete the two original fields.


Hello,

I imported my mail list from a text delimited file into access 2000. This
has over 7,000 records. My problem is my zip code fields are separated into
two different fields ex: Field113 has 11501 and Field114 has 2232. I need to
merge these two text fields so the out come will be: 11501-2232 then I can
generate my barcodes in word mail merge.

If any one know how to.

pls help.
thanks
 

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