Syntax Error with Append Query in VBA

echorley

Registered User.
Local time
Today, 01:38
Joined
Mar 11, 2003
Messages
131
I keep getting a syntax error (missing operator) with this bit of code when executing SQL in VBA.

"WHERE [tbl_Student_Roster].[Student Name]= " & [Forms]![form_Student_Roster]![Student_Name] & ";"

It is part of a larger piece, but the rest works (or does not give me an error).

Any ideas?

Thanks.
 
" WHERE [tbl_Student_Roster].[Student Name]= '" & [Forms]![form_Student_Roster]![Student_Name] & "';"
.
 
Yes!

Thanks. I must have been missing the single quote marks.
 

Users who are viewing this thread

Back
Top Bottom