O
oxicottin
Hello, I am trying to password protect my opening form and log the
information. It works great but one thing. When I close the database and
reopen I get the Log In form and the last password and log In name is still
there. How do I get it to be empty evertime I open my database? Do I make a
qry or do I add more code to the LOG IN button? Thanks!!!
On Error GoTo Err_CmdLogin_Click
If [LogStaffLoginName] = DLookup("[StaffLoginName]", "TblStaff",
"[StaffPassword]=forms!frmlogin!LogPasswordEntered") Then
DoCmd.OpenForm "FrmSwitchboard"
Else
Me!LogProblem = -1
DoCmd.Quit
End If
Forms!frmlogin.Visible = False
Exit_CmdLogin_Click:
Exit Sub
Err_CmdLogin_Click:
MsgBox Err.Description
Resume Exit_CmdLogin_Click
information. It works great but one thing. When I close the database and
reopen I get the Log In form and the last password and log In name is still
there. How do I get it to be empty evertime I open my database? Do I make a
qry or do I add more code to the LOG IN button? Thanks!!!
On Error GoTo Err_CmdLogin_Click
If [LogStaffLoginName] = DLookup("[StaffLoginName]", "TblStaff",
"[StaffPassword]=forms!frmlogin!LogPasswordEntered") Then
DoCmd.OpenForm "FrmSwitchboard"
Else
Me!LogProblem = -1
DoCmd.Quit
End If
Forms!frmlogin.Visible = False
Exit_CmdLogin_Click:
Exit Sub
Err_CmdLogin_Click:
MsgBox Err.Description
Resume Exit_CmdLogin_Click