There are two tables Nursing_Note and Temp_Nursing_No te. Once the form Temp_Nursing_No te is completed the user enters a part of their password then hits a command button that triggers an UPDATE query. The code is giving me a syntax error, please help.
Thanks,
Carl23
Thanks,
Carl23
Code:
Private Sub Command35_Click() Dim strSql As String strSql = "UPDATE [Nursing_Note] SET [Temp_Nursing_Note].[Nursing_Note_Number] = [Nursing_Note]![Temp_Note_Number]," strSql = strSql & " [Temp_Nursing_Note].[Resident_Num] = [Nursing_Note]![Resident_Num]," strSql = strSql & " [Temp_Nursing_Note].[Subject] = [Nursing_Note]![Subject]," strSql = strSql & " [Temp_Nursing_Note].[Nursing_Note_Data] = [Nursing_Note]![Nursing_Note_Data]," strSql = strSql & " [Temp_Nursing_Note].[Date] = [Nursing_Note]![Date], Temp_Nursing_Note.[Time] = [Nursing_Note]![Time]," strSql = strSql & " [Temp_Nursing_Note].[Staff] = [Nursing_Note]![Staff], Temp_Nursing_Note.Nurse4digitpw = [Nursing_Note]![Nurse4digitpw]," strSql = strSql & " WHERE ((Right$(Password,4) = [Temp_Nursing_Note.Nurse4digitpw]);" DoCmd.RunSQL strSql End Sub
Comment