I'm trying to get my code to copy certain fields from one table into another after a button click. I got it to where I stopped getting error messages, but my tables aren't updating. I want data from tblForm2Input copied to a new record to tblBosTracking.
I'm sure as usual it's probably something simple that I missed. Thank you for your time.
Code:
Private Sub saveandnew_Click()
DoCmd.Save
Me.Refresh
CurrentDb.Execute ("UPDATE tblForm2Input INNER JOIN tblBosTracking ON (tblForm2Input.[Observed By] = tblBosTracking.[Observed By]) AND (tblForm2Input.[Input Date] = tblBosTracking.[Input Date]) SET tblForm2Input.[Input Date] = tblBosTracking![Input Date], tblForm2Input.[Observed By] = tblBosTracking![Observed By]")
Me.Refresh
MsgBox "Record Saved Successfully!"
DoCmd.RunCommand acCmdRecordsGoToNew
Me!F2Date.SetFocus
End Sub
I'm sure as usual it's probably something simple that I missed. Thank you for your time.