HI
Still trying to update one field with a value from another table. Had lots of help and have I think grasped the concept.
used the following code
Code:
UPDATE tblDeceased, tblgrave SET fk_GraveID = tblGrave.GraveID
WHERE tblDeceased.GraveNo=tblGrave.GraveNo AND tblDeceased.Plot=tblGrave.Plot;
Iam using two tables tblGrave and tbldeceased.
My aim is to update the foreign key field in tbldeceased with the Primary key in the table tblGraves, Primary key is GraveID and foreign key id fk_graveID
criteria must be that the combination of plot and Graveno must be valid
Using the code posted on the forum I ran the update.
To my horror the field fk_GraveId is being updated with the data from the plot field which is formated as text. Both the GraveId and fk_Grave Id are number fields.
Would really appreciate a pointer in the right direction
thanks
Ian