hello guys,
i want to run an update query to update the last record in a table from multiple table
N.B: each table from where i want to bring data contains just one field and one record
this my code
any help?
i tried this way
but how can i put the lastID as criteria in the update query
i want to run an update query to update the last record in a table from multiple table
N.B: each table from where i want to bring data contains just one field and one record
this my code
Code:
UPDATE tbl_Sanctions SET tbl_Sanctions.Code01_01Year = [tbl_01Years_Code01].[txt_Text], tbl_Sanctions.Code01_05Year = [tbl_05Years_Code01].[txt_Text], tbl_Sanctions.Code01_10Year = [tbl_10Years_Code01].[txt_Text]
WHERE (((tbl_Sanctions.ID)=DMax([ID],[tbl_Sanctions])));
i tried this way
Code:
Dim obj As New DataObject
Dim lastID As Long
lastID = DMax("ID", "tbl_sanctions")
obj.SetText lastID
obj.PutInClipboard
but how can i put the lastID as criteria in the update query
Last edited: