J
johansf via AccessMonster.com
I want to copy some fields from one table to another table when they have
been updated.
I found below sql and put it in a the query but its is not working.
UPDATE Contacts RIGHT JOIN Extra contacts ON Contacts.Contact ID = Extra
contacts.Contact ID
SET Contacts.Contact ID = [Extra contacts]![Contact ID],
Contacts.HD ID = [Extra Contact ID]![HD ID],
Contacts.Primary contact = [Extra Contact ID]![Primary contact],
Contacts.First Name = [Extra Contact ID]![First Name],
Contacts.Last Name = [Extra Contact ID]![Last Name],
Contacts.OwnerID = [Extra Contact ID]![OwnerID],
Contacts.Country = [Extra Contact ID]![Country],
Contacts.Title = [Extra Contact ID]![Title],
Contacts.Work Phone = [Extra Contact ID]![Work Phone],
Contacts.Mobile Phone = [Extra Contact ID]![Mobile Phone],
Contacts.Email Name = [Extra Contact ID]![Email Name]
I get an error message:
syntax error (missing operator) in query expression 'Contacts.Contact ID =
Extra contacts.Contact ID'
been updated.
I found below sql and put it in a the query but its is not working.
UPDATE Contacts RIGHT JOIN Extra contacts ON Contacts.Contact ID = Extra
contacts.Contact ID
SET Contacts.Contact ID = [Extra contacts]![Contact ID],
Contacts.HD ID = [Extra Contact ID]![HD ID],
Contacts.Primary contact = [Extra Contact ID]![Primary contact],
Contacts.First Name = [Extra Contact ID]![First Name],
Contacts.Last Name = [Extra Contact ID]![Last Name],
Contacts.OwnerID = [Extra Contact ID]![OwnerID],
Contacts.Country = [Extra Contact ID]![Country],
Contacts.Title = [Extra Contact ID]![Title],
Contacts.Work Phone = [Extra Contact ID]![Work Phone],
Contacts.Mobile Phone = [Extra Contact ID]![Mobile Phone],
Contacts.Email Name = [Extra Contact ID]![Email Name]
I get an error message:
syntax error (missing operator) in query expression 'Contacts.Contact ID =
Extra contacts.Contact ID'