I am trying to update two fields in a table.
Table Details:
Name: tblUsersHistory
Field 1 - usrName
Field 2 - loginDate
Field 3 - loginTime
Field 4 - logoutDate
Field 5 - logoutTime
I insert the first three fields into this table at login:
CurrentDb.Execute "INSERT INTO tblUsersHistory (usrName,loginDate,loginTime) VALUES ('" & whoRU & "','" & usrLoginDate & "','" & usrLoginTime & "')"
Then at logout I want to update the last two fields. This is the statement I have but I keep getting the Error 3061 - Too Few Parameters. Expected 1:
CurrentDb.Execute "UPDATE tblUsersHistory SET [logoutDate] = '" & Date & "', [logoutTime] = '" & Time & "' WHERE [userName] = '" & whoRU & "' AND [loginDate] = '" & usrLoginDate & "' AND [loginTime] = '" & usrLoginTime & "';"
PLEASE HELP!!!