I am having problems when my database compiles in Windows 95 Machines, but Windows NT and 2000 are fine.
It gives me a compile error when I use the Dlookup function.
Here is my code
Sub main()
Dim add
add = 0
End Sub
Sub authorise()
If DLookup("[Password]", "User", _
"[Username]='" & Me![txtusername] & "'"
= Me![txtpassword] Then
count2 = 0
count3 = 0
DoCmd.OpenForm "selection form"
Else
MsgBox "Incorrect Password, Please Try Again"
If add = 0 Then count2 = count3 + 1
count3 = count2
End If
End Sub
Private Sub Command4_Click()
If locked = -1 Then
Message2
ElseIf count2 = 3 And DLookup("[Password]", "User", _
"[Username]='" & Me![txtusername] & "'"
<> Me![txtpassword] Then
Message
Else
authorise
End If
End Sub
Sub Message()
MsgBox "You have entered the incorrect password to many times"
locked = -1
End Sub
Sub Message2()
MsgBox "Your are locked out please contact a member of the IT staff"
End Sub
Cheers
Djbell
It gives me a compile error when I use the Dlookup function.
Here is my code
Sub main()
Dim add
add = 0
End Sub
Sub authorise()
If DLookup("[Password]", "User", _
"[Username]='" & Me![txtusername] & "'"
count2 = 0
count3 = 0
DoCmd.OpenForm "selection form"
Else
MsgBox "Incorrect Password, Please Try Again"
If add = 0 Then count2 = count3 + 1
count3 = count2
End If
End Sub
Private Sub Command4_Click()
If locked = -1 Then
Message2
ElseIf count2 = 3 And DLookup("[Password]", "User", _
"[Username]='" & Me![txtusername] & "'"
Message
Else
authorise
End If
End Sub
Sub Message()
MsgBox "You have entered the incorrect password to many times"
locked = -1
End Sub
Sub Message2()
MsgBox "Your are locked out please contact a member of the IT staff"
End Sub
Cheers
Djbell