Ok so what am I looking for ??
Here is the code
Private Sub Logon_OK_Cancel()
On Error Resume Next
' declare string variables for messages
Dim strMsg As String, strTitle As String
'if the ok button is clicked and there's missing info,
'let the user know and start again.
If IsNothing(Me!txtUserID) Or IsNothing(Me!txtPassword) Then
strMsg = "Please enter a Valid User ID and Password."
strTitle = "Login"
MsgBox strMsg, vbCritical, strTitle
Me!txtUserID.SetFocus
Exit Sub
End If
'we've got this far, so the user has input an ID and password.
'copy their details to the local PC.
DoCmd.SetWarnings False ' no need to tell me a query is being run
DoCmd.OpenQuery "qryUsersLocal" 'run the query
DoCmd.SetWarnings True ' tell me next time a query is being run
'making the local table now, greatly speeds up these DLOOKUPS
'check that the user exits
If IsNull(DLookup("[Title]", "tblUsersLocal", "[UserID] = Form.[txtUserID]"

) Then
strMsg = "User ID is Invalid, Please try again."
strTitle = "Invalid User ID"
MsgBox strtMsg, vbCritical, strTitle
Me!txtUserID.SetFocus
Exit Sub
End If
'check that their password is correct
If Not DLookup("[Password]", "tblUsersLocal", "[UserID] = Form.txtUserID"

= Forms![frmLogin]![txtPassword] Then
strMsg = "Password is Invalid, Please try again."
strTitle = "Invalid Password"
MsgBox strtMsg, vbCritical, strTitle
Me!Password.SetFocus
Exit Sub
End If
'the user exists and their password is correct
Me.Visible = False ' hide the frmLogin but don't unload it.
DoCmd.OpenForm "Your Splash Screen" 'open or show your splash screen
End Sub