C
candoit
Guest
I converted my database from access 97 to 2000 but the login form will not work anymore. I found out that since I put an input password mask, on the password textbox, of the login form and in the password field, of the security table, when they are compared there is never a match.
Here is piece of the code:
Me!usernameCbo.SetFocus
logname = usernameCbo.SelText
Me!password.SetFocus
logpwd = password.Text
If logname <> Empty And logpwd <> Empty Then
StrSQL = "SELECT username,password " _
& "FROM security WHERE username='" & logname & "'" _
& "AND password='" & logpwd & "';"
Set rstSecurity = dbs.OpenRecordset(StrSQL,OpenSnapshot, dbForwardOnly)
If rstSecurity.RecordCount = 1 Then
'user is valid and database is opened
This code works fine in 97. Why won't it work in 2000? I know that the input mask has something to do with this because the code works fine without the password input mask.
Here is piece of the code:
Me!usernameCbo.SetFocus
logname = usernameCbo.SelText
Me!password.SetFocus
logpwd = password.Text
If logname <> Empty And logpwd <> Empty Then
StrSQL = "SELECT username,password " _
& "FROM security WHERE username='" & logname & "'" _
& "AND password='" & logpwd & "';"
Set rstSecurity = dbs.OpenRecordset(StrSQL,OpenSnapshot, dbForwardOnly)
If rstSecurity.RecordCount = 1 Then
'user is valid and database is opened
This code works fine in 97. Why won't it work in 2000? I know that the input mask has something to do with this because the code works fine without the password input mask.