Combining query statements

G

Guest

I have a macro that runs a query to update a field in my Access table from a
linked table from another database:

UPDATE ItemMaster INNER JOIN AMFLIB_ITEMASA ON
ItemMaster.ITNOIM=AMFLIB_ITEMASA.ITNBR SET ItemMaster.UCDEF =
AMFLIB_ITEMASA.UCDEF;

I also want to run a similar query using a different field:

UPDATE ItemMaster INNER JOIN AMFLIB_ITEMASA ON
ItemMaster.ITNOIM=AMFLIB_ITEMASA.ITNBR SET ItemMaster.whslc =
AMFLIB_ITEMASA.WHSLC;

How do I combine the two queries into one statement so that I don't have to
run 2 separate macros?
 
G

Guest

Backup database and use this --
UPDATE ItemMaster INNER JOIN AMFLIB_ITEMASA ON
ItemMaster.ITNOIM=AMFLIB_ITEMASA.ITNBR SET ItemMaster.UCDEF =
AMFLIB_ITEMASA.UCDEF, ItemMaster.whslc = AMFLIB_ITEMASA.WHSLC;
 

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