i have table consider table 1 which contains employee code which is unique and date of leaving
and there is another table consider table 2 where employee code is foreign key and contains Date of leaving(which is blank).
i want on click of button all the employee code present in table 2 to get updated with date of leaving present in table 1
i am trying following code
but its not working
PLZ HELP
and there is another table consider table 2 where employee code is foreign key and contains Date of leaving(which is blank).
i want on click of button all the employee code present in table 2 to get updated with date of leaving present in table 1
i am trying following code
Code:
Private Sub YOUR_COMMAND_Click()
Dim strSql As String
strSql = "UPDATE [TABLE_2]" & _
"SET [TABLE_2].Date_of_Leaving = '"table_1.[DATE_OF lEAVING]'" WHERE EMP_CODE= ' "TABLE1.EMP_CODE " '"
DoCmd.RunSQL strSql
PLZ HELP
Comment