Concatenate part of two fields for report only

D

Darhl Thomason

I need to concatenate part of two fields together for a report. Our
internal store # is always 5 characters long, 2 letter state code followed
by 3 digit store # (i.e. WA123). Our POS vendor uses the first two digits
of the zip code followed by the store # (i.e. 98123). I have the store #
field and the Zip code field in my database and I need to know how to pull
the first two digits of the zip code and concatenate it to the last three
digits of the store number to display on a report for our POS vendor. Both
of these fields are fixed at 5 characters.

Any help would be hugely appreciated!

Thanks!

Darhl
 
B

BruceM

In an unbound text box on the report, you could have as the Control Source:

= Left([Zip],2) & Right([StoreNumber],3)

Use the actual field or control names, of course, instead of what I have put
in the brackets. See Help for more information on the Left and Right
functions. Take a look at Mid while you're there, just so you know for
future reference what it does.
 
D

Darhl Thomason

Thanks Bruce,

That's exactly what I'm looking for. I remember Left, Right, Mid from a
million years ago doing BASIC programming on my trusty TRS-80. Looks like
those functions haven't changed much. I haven't done much programming until
recently, so I had forgotten about them.

Thanks again!

d


BruceM said:
In an unbound text box on the report, you could have as the Control
Source:

= Left([Zip],2) & Right([StoreNumber],3)

Use the actual field or control names, of course, instead of what I have
put in the brackets. See Help for more information on the Left and Right
functions. Take a look at Mid while you're there, just so you know for
future reference what it does.

Darhl Thomason said:
I need to concatenate part of two fields together for a report. Our
internal store # is always 5 characters long, 2 letter state code followed
by 3 digit store # (i.e. WA123). Our POS vendor uses the first two digits
of the zip code followed by the store # (i.e. 98123). I have the store #
field and the Zip code field in my database and I need to know how to pull
the first two digits of the zip code and concatenate it to the last three
digits of the store number to display on a report for our POS vendor.
Both of these fields are fixed at 5 characters.

Any help would be hugely appreciated!

Thanks!

Darhl
 

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