C
cmarsh
It could be because I have looked at this too long but I just can't find
what is wrong. The problem is in the DLookup statement below, where the
error shows
' [strUser] = John Doe'
Private Sub cmdlogin_Click()
'Checking if cmbuser is null
If IsNull(Me.cmbuser) Or Me.cmbuser = "" Then
MsgBox "You must enter a User Name.", vbOKOnly
Me.cmbuser.SetFocus
Exit Sub
End If
'Checking if txtpass is null
If IsNull(Me.txtpass) Or Me.txtpass = "" Then
MsgBox "You must enter a Password.", vbOKOnly
Me.txtpass.SetFocus
Exit Sub
End If
'Checking value of password
********************************
If Me.txtpass.Value = DLookup("strPassword", "tblLogin", " [strUser] = " &
Me.cmbuser.Value) Then
lnguser = Me.cmbuser.Value ' stored in module for future use
********************************
what is wrong. The problem is in the DLookup statement below, where the
error shows
' [strUser] = John Doe'
Private Sub cmdlogin_Click()
'Checking if cmbuser is null
If IsNull(Me.cmbuser) Or Me.cmbuser = "" Then
MsgBox "You must enter a User Name.", vbOKOnly
Me.cmbuser.SetFocus
Exit Sub
End If
'Checking if txtpass is null
If IsNull(Me.txtpass) Or Me.txtpass = "" Then
MsgBox "You must enter a Password.", vbOKOnly
Me.txtpass.SetFocus
Exit Sub
End If
'Checking value of password
********************************
If Me.txtpass.Value = DLookup("strPassword", "tblLogin", " [strUser] = " &
Me.cmbuser.Value) Then
lnguser = Me.cmbuser.Value ' stored in module for future use
********************************