Insert Into syntax error help

Coleman984

Registered User.
Local time
Today, 00:43
Joined
Jul 28, 2011
Messages
89
I get a syntax error message everytime I try this code. Any idea why?
Code:
cDB = currentdb.Name


  strSql = "INSERT INTO tblEmployeeAttendance_archive (pkEmpAttID, fkEmployeeID, dteAttendance,fkAttendanceTypeID) " & _
    "IN " & cDB & _
    "SELECT pkEmpAttID, fkEmployeeID, dteAttendance, fkAttendanceTypeID FROM tblEmployeeAttendance WHERE (dteAttendance <= #" & DateMin1Yr & "#);"
 
You need a space in front of SELECT.
 

Users who are viewing this thread

Back
Top Bottom