
Originally Posted by
Reaper
Ok, I think I get the idea. However, tblTransactions will not have a value in the strPickLaod_ID field, yet. The tblTransactions and tblPickDetails will be linked by the strTicket field. So the modified code will look like?:
dim sTk as integer
sTk = Me.strTicket
UPDATE tblPickLoadDetails INNER JOIN tblTransactions ON tblPickLoadDetails.strTicket = tblTransactions.strTicket SET tblTransactions.ynTicketConsumed = True
WHERE (((tblPickLoadDetails.strTicket) = " & sTk & "));"
The other half of the process would be to update tblTransactions.strPickLoad_ID with tblPickLoadDetails.strPickLoad_ID. Using the same code?:
dim sID as integer
sID = Me.strPickLoad_ID
UPDATE tblPickLoadDetails INNER JOIN tblTransactions ON tblPickLoadDetails.strTicket = tblTransactions.strTicket SET tblTransactions.strPickLoad_ID = sID
WHERE (((tblPickLoadDetails.strTicket)= " & sTk & "));"
This still leaves me with duplicated data in two tables. Any way around this other than deleting the records in tblPickDetails when I'm done?