Hello one and all.
I have a simple Q for you. Whats wrong with this please?
Code:
'Find the size of the Users table
varRecordCount = DCount("UserName", "tblDBUsers")
varLoop = 0
'Compare the user name with record n of the users table.
While varLoop <= varRecordCount
If varUserName = tblDBUsers.UserName Then
If varPassword = tblDBUsers.Password Then
varLoginDetailsOK = True
End If
End If
varLoop = varLoop + 1
Wend
'ONLY if the password is OK do you do the following...
If (varLoginDetailsOK = True) Then
I see the error "object required" therefore I assume that I need to do something to prepare the way. I know the while loop isn't finished with the relevant exits, but the error starts before I get in to the loop itself. When stepping through it stops at the "While varLoop <= varRecordCount" expression.
I guess it might be better done in SQL? I really am a newbie, picking up bits here and there. Thanks.
Mike.