I have the following code that is suppose to append three fields from the tblCertificationsDates to tblCombinedCerts. The strWhere compiles what classes I want selected. I run a make table SQL query before this code to capture data from another table and the strWhere works properly.
‘ SQL for append query
strSQL = “INSERT INTO tblCombinedCerts ( LearnerID, ClassName, DateOfClassStart )” & _
“SELECT LearnerID, Type, Date” & _
“FROM tblCertificationDates WHERE ” & strWhere
‘ Execute it
DoCmd.RunSQL strSQL
Which gives me a 3075 runtime error code: “Syntax error (missing operator) in query.” I am just starting to use more SQL in my work and I don’t see the error. I actually created the query in the QBE view then switched to SQL and copied that to VBA and added the line breaks. It stops at the DoCmd.
Any help and teaching is appreciated. Thank you. Fay