Dear all,
I have a logout button on main menu form that logout the current user close the main form and open the login form and edit the logout time in table login history table, but when i click on the button, this message appeared
" syntax error in string in expression run-time error '3077': "
button contain following code and the User_name field in tbl_Login_History is text field.
table screenshot attached
thanks in advance
I have a logout button on main menu form that logout the current user close the main form and open the login form and edit the logout time in table login history table, but when i click on the button, this message appeared
" syntax error in string in expression run-time error '3077': "
button contain following code and the User_name field in tbl_Login_History is text field.
table screenshot attached
Code:
intResponse = MsgBox("Warning: You are about to Logout" & Chr(13) & _
"from database, Are you sure?", vbYesNo + vbExclamation, "Confirm")
Set db = CurrentDb()
Set rst = db.OpenRecordset("tbl_Login_History", dbOpenDynaset)
Select Case intResponse
Case vbYes
[COLOR="Red"]rst.FindLast "Login_History_ID = " & txtUser & "'"
[/COLOR] rst.Edit
rst!Time_Out = Now()
rst.Update
DoCmd.OpenForm "frmLogin"
DoCmd.Close acForm, "frmDB6"
End Select
thanks in advance