You are on page 1of 1

If IsNull(Me.cmbLogin) Or Me.cmbLogin = "" Then MsgBox " You must enter a User Name.", vbOKOnly, "Required Data" Me.cmbLogin.

SetFocus Exit Sub End If

'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" Me.txtPassword.SetFocus Exit Sub End If

'check value of password in tLogin to see if this matches value choosen in combo box

If Me.txtPassword.Value = DLookup("EmpPassword", "tLogin", "(EmpID)=" & Me.cmbLogin.Value) Then MyEmpID = Me.cmbLogin.Value

'close logon form and open splash screen

DoCmd.Close acForm, "frmlogin", acSaveNo DoCmd.OpenForm

You might also like