Question as above. The SQL code I am currently using is as follows:
"INSERT INTO [tblClasses/Students] (StudentID, ClassID) " & _
"SELECT StudentID FROM tblStudent WHERE Username = @StudentUser " & _
"SELECT ClassID FROM tblClasses WHERE ClassName = @ClassName ;"
When I try to run this query, I receive the following error message:
'Number of query values and destination fields are not the same'
Clearly, the method I am using does not work, so does anyone know the correct way of writing the query?