Does anyone know why the "Insert Into" part of this code is not working?
Sub AddHoliday_YTD_Table()
Dim strSQL As String
strSQL = "INSERT INTO NumberOfIncidents_YTD [EMPNO],[EMPNAME],[DBA],[DATE],[NUMHRS]" & _
"SELECT [EMPNO],[EMPNAME],[DBA],[NUMHRS],[DATE]" & _
"FROM [HOURS HISTORY]where [DATE] = #02/17/03# ;"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
End Sub
Sub AddHoliday_YTD_Table()
Dim strSQL As String
strSQL = "INSERT INTO NumberOfIncidents_YTD [EMPNO],[EMPNAME],[DBA],[DATE],[NUMHRS]" & _
"SELECT [EMPNO],[EMPNAME],[DBA],[NUMHRS],[DATE]" & _
"FROM [HOURS HISTORY]where [DATE] = #02/17/03# ;"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
End Sub