Guidance required for Update Query

G

Guest

I have an access database with a customer table listing various details, such
as customer ID, Name, date joined, main contact, etc.
I need to update specific information, for specific customer ID's. I
therefore have a maintenance table showing the records (by customer ID) that
I wish to update the customer table with.
I created an update query, selecting the Main Contact field and specifying
the 'update to' as: [Maintenance].[Name]. I will need to specifiy which
customer this relates to though, therefore do I need to drag the customer ID
into another field in the design grid? Do I then leave the Update To field
blank?
 
G

Guest

you need to have both tables as the source for your query, with a join on the
Customer ID.
 
M

Michel Walsh

If your problem is like updating unit prices for some items, you need a
join:

UPDATE pricesList LEFT JOIN newPrices
ON pricesList.itemID = newPrices.itemID
SET pricesList.unitPrice = newPrices.unitPrice,
pricesList.itemID = newPrices.itemID



(note that it not only update existing prices, but also append new items, if
it is the case).


Hoping it may help,
Vanderghast, Access MVP
 

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