combining data

J

jamccarley

I have two fields, one is the Ki (japanese for years in business) and the
other is the numerical number for the record. I have set up the number field
to increase by one on every new record. My question is: Is there a way to
comine the field in a query so that I can have them show up together on a
form? ex (KI) 57 and (record) 1234 to show up on a form as "571234"

Thanks
Josh
 
A

Al Campagna

jamccarley,
Just concatenate the two values in a calculated text control.
If Ki is always two digits...
A text control with a CotrolSource of...
= [KI] & [YourNumField]
will always display the concatenated result.

If Ki varies in length then use a dash separator...
= [KI] & "-" & [YourNumField]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
J

jamccarley

Ki will be two digets for 43 more years. Thanks for the quick response

Al Campagna said:
jamccarley,
Just concatenate the two values in a calculated text control.
If Ki is always two digits...
A text control with a CotrolSource of...
= [KI] & [YourNumField]
will always display the concatenated result.

If Ki varies in length then use a dash separator...
= [KI] & "-" & [YourNumField]
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

jamccarley said:
I have two fields, one is the Ki (japanese for years in business) and the
other is the numerical number for the record. I have set up the number
field
to increase by one on every new record. My question is: Is there a way to
comine the field in a query so that I can have them show up together on a
form? ex (KI) 57 and (record) 1234 to show up on a form as "571234"

Thanks
Josh
 
J

John W. Vinson

I have two fields, one is the Ki (japanese for years in business) and the
other is the numerical number for the record. I have set up the number field
to increase by one on every new record. My question is: Is there a way to
comine the field in a query so that I can have them show up together on a
form? ex (KI) 57 and (record) 1234 to show up on a form as "571234"

Thanks
Josh

You'll need to think about how this should look. If the Record field (Access
of course does not have record numbers!) has four-digit and three-digit and
two-digit instances, a simple concatenation using & will copy the field "as
is" - 571, 572, 5710, 571234.

If you'ld rather have all the concatenations the same size with leading zeros
for the record, use the Format() function:

[KI] & Format([record], "0000")

will give 570001, 570010 and so on.
 

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