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
Expand|Select|Wrap|Line Numbers
- 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