Primary Key Problem

In query design view there will be an option to show SQL or SQL view.
Click that option, then copy and paste to forum.
 
Ok, here is the basic SQL which was auto generated from the update query. Not amended it in any way.

UPDATE [observation-transfer] SET [observation-transfer].ID = [observation].[ID], [observation-transfer].[Modified Grade] = [observation].[Modified Grade], [observation-transfer].[Final Grade] = [observation].[Final Grade], [observation-transfer].Action1 = [observation].[action1], [observation-transfer].Completed1 = [observation].[completed1], [observation-transfer].Action2 = [observation].[action2], [observation-transfer].Completed2 = [observation].[completed2], [observation-transfer].Action3 = [observation].[action3], [observation-transfer].Completed3 = [observation].[completed3], [observation-transfer].Action4 = [observation].[action4], [observation-transfer].Completed4 = [observation].[completed4], [observation-transfer].PrimaryKey = [observation].[primarykey];
 
You have an UPDATE query that involves 2 tables [observation-transfer] and [observation]. You do not show any JOIN information to show how these tables are related.

The syntax for an Update query that involves 2 tables is typically

UPDATE Table1 INNER JOIN Table2 ON Table1.PARTId = Table2.PARTId
SET Table1.MFG = Table2.Mfg
,Table1.Fld2 = Table2.Fld2
,Table1.FldX = Table2.FldX;
 

Users who are viewing this thread

Back
Top Bottom