QUOTE (theDBguy @ May 18 2012, 01:55 PM)
This is with the form hidden, correct? You did notice that I commented out the line in your code that closes it, right?
Still doesnt work.
Here is current code behind Logon button:
Private Sub cmdLogin_Click()
'Check to see if data is entered into the UserName combo box
If IsNull(Me.cboEmployee) Or Me.cboEmployee = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
'Check to see if data is entered into the password box
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
'Check value of password in tblEmployees to see if this
'matches value chosen in combo box
If Me.txtPassword.Value = DLookup("strEmpPassword", "tblEmployees", _
"[lngEmpID]=" & Me.cboEmployee.Value) Then
lngMyEmpID = Me.cboEmployee.Value
'Close logon form and open splash screen
' DoCmd.Close acForm, "frmLogon", acSaveNo
'Hide logon form and open splash screen
Me.Visible = False
MsgBox "Password Invalid. Please Try Again", vbOKOnly, _
'If User Enters incorrect password 3 times database will shutdown
intLogonAttempts = intLogonAttempts + 1
If intLogonAttempts > 3 Then
MsgBox "You do not have access to this database.Please contact admin.", _
vbCritical, "Restricted Access!"
Here is what I have for the Control Source on Menu Form for name: