Copy Data between fields in same table

A

Amy

I have a field that I need to duplicate the data into another field for
purposes of performing a mail merge in a program that the developers didn't
feel we needed to use as a mail merge field. I have been trying to use an
update query and I cannot get it to do anything. Both fields are in the same
table, this has morphed to the point I have no idea where I started with
this. I think the orginal query looked quite simple, something like update
AccountingCode = CVPasswords. Which didn't work either.

Here is where I am after a whole lot of trial and error:

UPDATE tblClients SET AccountingCode =
DLookup("PRPWd","qryCvPassWords","ID='" & [ID] & "'");

I would appreciate any help.

Thanks,

Amy
 
K

KARL DEWEY

Backup your database first.
Try this --
UPDATE tblClients SET AccountingCode = CVPassWords;

But would it not be easier to revise the merge to use AccountingCode instead
of CVPassWords?
 
J

John W. Vinson

I have a field that I need to duplicate the data into another field for
purposes of performing a mail merge in a program that the developers didn't
feel we needed to use as a mail merge field. I have been trying to use an
update query and I cannot get it to do anything. Both fields are in the same
table, this has morphed to the point I have no idea where I started with
this. I think the orginal query looked quite simple, something like update
AccountingCode = CVPasswords. Which didn't work either.

Here is where I am after a whole lot of trial and error:

UPDATE tblClients SET AccountingCode =
DLookup("PRPWd","qryCvPassWords","ID='" & [ID] & "'");

I would appreciate any help.

Thanks,

Amy

You almost surely do NOT need to store this accounting code redundantly in
your table.

Instead, create a Query based on the table including the accountingcode field
twice, aliasing it the second time: in a vacant Field cell in the query type

AccountingCode: CVPasswords

Then use the *query* for your mail merge, instead of the table.
 

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