Joining fields

  • Thread starter Thread starter Sheila
  • Start date Start date
S

Sheila

I have two fields (customer number and part number) that I
would like to combine into one. Example: customer number
123 and part number 456789 would become 123456789.
Is this possible and if so how do I do it? Any help would
be greatly appreciated.

Thank-you,
Sheila
 
Do you just want to view the joined fields in a query or actually join them and save them to a field in your table?
 
I want to be able to join them and save them to a new
field. I'm sure it's something very simple, but I can't
figure it out.
-----Original Message-----
Do you just want to view the joined fields in a query or
actually join them and save them to a field in your table?
 
Well, normally it is a bad idea to combine two types of data into one field.
You should keep them separate and just combine them when you need to view them.
Since you didn't tell us the field types I will assume that they are strings
(text) fields.

Field: Combined: [Customer Number] & [Part Number]

If they are number fields then try:

Field: Combined: CStr([Customer Number]) & CStr([Part Number])

If they are number fields and you want to end up with a number field

Field: Combined: Val(CStr([Customer Number]) & CStr([Part Number]))

To save to a new field, you will use one of the above calculated fields as the
UPDATE TO value in an update query. BUT as I said, it is normally a bad idea to
save these two different pieces of data in one field.
 
Yes, they are text fields. I normally wouldn't combine
them, but that is the only way our internal system
recognizes the "part number". It worked great.
-----Original Message-----
Well, normally it is a bad idea to combine two types of data into one field.
You should keep them separate and just combine them when you need to view them.
Since you didn't tell us the field types I will assume that they are strings
(text) fields.

Field: Combined: [Customer Number] & [Part Number]

If they are number fields then try:

Field: Combined: CStr([Customer Number]) & CStr([Part Number])

If they are number fields and you want to end up with a number field

Field: Combined: Val(CStr([Customer Number]) & CStr([Part Number]))

To save to a new field, you will use one of the above calculated fields as the
UPDATE TO value in an update query. BUT as I said, it is normally a bad idea to
save these two different pieces of data in one field.
I want to be able to join them and save them to a new
field. I'm sure it's something very simple, but I can't
figure it out. or
actually join them and save them to a field in your table?
.
 
Back
Top