Hello guys,
I actually don't have knowledge about codes and I'm just following youtube samples.
I'm just trying my luck here maybe someone can help me to solve this.
Private Sub btnLogout_Click()On Error GoTo btnLogoutErrHandler
Dim db As DatabaseSet db = CurrentDb()
db.Execute "UPDATE TBL_LOGIN_LOG SET TBL_LOGIN_LOG.LOGOUT_TIME=NOW()" _
& "WHERE TBL_LOGIN_LOG.LOGOUT_TIME Is Null AND TBL_LOGIN_LOG.USERNAME='" + Forms!FRM_LOGIN!txtUsername + "'"
DoCmd.Close acForm, Me.Name
DoCmd.Close acForm, "FRM_LOGIN"
DoCmd.OpenForm "FRM_LOGIN"
btnLogoutErrExit:
Exit Sub
btnLogoutErrHandler:MsgBox Err.Description, vbExclamation, "Oops! Error No- " & Err.Number
Resume btnLogoutErrExit
End Sub
and when I'm going to Click the Logout Button in the Log In Form it shows a message that Microsoft Access can't find the form "FRM_LOGIN"