add field 3 then fill it with concatenation of field1&fi

muster101

New Member
Joined
Mar 14, 2002
Messages
13
Greetings,

In Access I have a 950k record table. I want to create a new field in each record and populate it with a concatenation of 2 other fields from the same record:

field1 = 111
field2 = 222

newfield3 = 111222

lord i'm sure this is easy but my brain is cramping bad....

thanks for any help!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Re: add field 3 then fill it with concatenation of field1&am

Hi muster101,

I'd suggest something like I suggested here:
http://www.mrexcel.com/board2/viewtopic.php?t=52959

use a formula in a query like :
newfield3: [field1] & [field2]

SQL such as

SELECT TblMuster.Field1, TblMuster.Field2, [field1] & [field2] AS NewField3
FROM TblMuster;

or if you use an update query, SQL as follows:
UPDATE TblMuster SET TblMuster.NewField3 = [field1] & [field2];

I imagine you will need to adjust the table and field names.

HTH,
 
Upvote 0
Re: add field 3 then fill it with concatenation of field1&am

Corticus,

I used your 'UPDATE' suggestion and this worked fine! I actually do this 3 times for each reocrd to update different concatenated fields I need.

I made a query for each...now if I could just figure out how to have all 3 done in the same query?

(can you tell I'm new at this?)

Thanks again, take the rest of the day off !!

Mr M
 
Upvote 0
Re: add field 3 then fill it with concatenation of field1&am

Glad it worked!

Could you provide the relavant table and field names so I can give the correct SQL? That way you won't have change names or anything like that.
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,357
Members
451,642
Latest member
mirofa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top