samuelsisgay
Programmer
Just a quickie...syntax problem
I am trying to call open a table called results, fetch data from my form and update the table with this data into a particular username and password record.(As shown, i have declared a variable to store a particular username, password).
Call rst1.Open("SELECT * FROM results where username =" & okUsername & " and password =" & okPassword, cnn, adOpenKeyset, adLockOptimistic)
With rst1
'.AddNew
.Fields("Trial1Correct".Value = txtCorrect.Text
.Fields("NoQuestions1".Value = txtTotal.Text
.Update
End With
...
I couldn't figure out the syntax problem using MSDN and etc.
SYNTAX PROBLEM: Syntax error (missing operator) in query expression 'username = and password='.
Thanks
I am trying to call open a table called results, fetch data from my form and update the table with this data into a particular username and password record.(As shown, i have declared a variable to store a particular username, password).
Call rst1.Open("SELECT * FROM results where username =" & okUsername & " and password =" & okPassword, cnn, adOpenKeyset, adLockOptimistic)
With rst1
'.AddNew
.Fields("Trial1Correct".Value = txtCorrect.Text
.Fields("NoQuestions1".Value = txtTotal.Text
.Update
End With
...
I couldn't figure out the syntax problem using MSDN and etc.
SYNTAX PROBLEM: Syntax error (missing operator) in query expression 'username = and password='.
Thanks