Password Check

jonnymenthol

Registered User.
Local time
Today, 09:53
Joined
Oct 31, 2001
Messages
58
Hello,

Can anyone shed any light on why the following code will not work when I split my DB into Front end / Back End.

It worked fine when all tables and everything were local, but since the split, it just won't work.

I don't receive an error, the button it is linked to just doesn't function.

Thanks.

---------------------------

Code:
Dim curdb As Database
Dim currst As Recordset
Set curdb = CurrentDb
Set currst = curdb.OpenRecordset("TblUsers")
currst.Index = "PrimaryKey"
currst.Seek "=", Me.TxtUsername, Me.TxtPassword
If Counter <= 2 Then
If currst.NoMatch Then
    MsgBox "The Password You Have Entered Is Invalid, Please Try Again!", VbOKOnly + vbCritical, "Error"
    TxtPassword.Value = ""
    TxtPassword.SetFocus
    Counter = Counter + 1
Else
    DoCmd.OpenForm "FrmLoading"
    DoCmd.OpenForm "FrmPassword", , , , , acHidden
End If
Else
MsgBox "you have entered an incorrect password 3 times", vbOKOnly
DoCmd.Close
End If

----------------------------------------

Thanks.

J
 
Last edited by a moderator:
Hi,

I should imagine that this line is giving you the problem

Set curdb = CurrentDb

I would use the ADO alternative for Recordsets
 
Thanks for that, and apologies for my ignorance, but what would the ADO alternative be ?

I'm very new to this, so I'm not sure I understand.

Thanks.

J.
 

Users who are viewing this thread

Back
Top Bottom