D
Downie
I've got the Login verification process working
(UserID will be email address
Scenario:
A user forgets their password?
I'd like them to be able to the user and email with userid and password
I thinking the user will enter in their email address[userid]
Click a get password button.
BELOW Is what I have coded behind the get password button.
(Basically stores the email on the form and runs a check in the users
data table
Finds a match
Emails both the user id and password back to their inbox.)
The WHERE CLAUSE is giving me
Run-time error '-2147217900 (80040e14)'
Syntax error (missing operator) in query expression '((users.Login) =
(e-mail address removed))'.
Private Sub Command32_Click()
Dim SQLString As String
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
DoCmd.SetWarnings False
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
SQLString = "SELECT users.Login, users.Password "
SQLString = SQLString & "From users "
SQLString = SQLString & "WHERE ((users.Login) = " & Login.Value &
");"
cmd.CommandText = SQLString
rst.CursorLocation = adUseClient
rst.Open cmd, , adOpenKeyset, adLockOptimistic
(UserID will be email address
Scenario:
A user forgets their password?
I'd like them to be able to the user and email with userid and password
I thinking the user will enter in their email address[userid]
Click a get password button.
BELOW Is what I have coded behind the get password button.
(Basically stores the email on the form and runs a check in the users
data table
Finds a match
Emails both the user id and password back to their inbox.)
The WHERE CLAUSE is giving me
Run-time error '-2147217900 (80040e14)'
Syntax error (missing operator) in query expression '((users.Login) =
(e-mail address removed))'.
Private Sub Command32_Click()
Dim SQLString As String
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
DoCmd.SetWarnings False
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
SQLString = "SELECT users.Login, users.Password "
SQLString = SQLString & "From users "
SQLString = SQLString & "WHERE ((users.Login) = " & Login.Value &
");"
cmd.CommandText = SQLString
rst.CursorLocation = adUseClient
rst.Open cmd, , adOpenKeyset, adLockOptimistic