-3

I have a query that currently inserts data from one table into another table,

moveQuery = "INSERT INTO results(ClassCode, AttemptDate, StudentID, Mark) 
SELECT F1,F2,F3,F4 FROM " & randtablename & " where F1 = '" & classcode & "'"

I'd like to insert an extra column from a variable while doing so.

How can I do this in Microsoft Access VBA?

Benjamin W.
  • 46,058
  • 19
  • 106
  • 116
user976007
  • 35
  • 1
  • 5

1 Answers1

0
INSERT INTO results(ClassCode, AttemptDate, StudentID, Mark, Other_column) 
SELECT F1,F2,F3,F4, 'extraVariable'
FROM ...
juergen d
  • 201,996
  • 37
  • 293
  • 362