I have written the following SQL statemenbt when I try to execute I get a message
"Characters found after end of SQL statement"
The statement is
Function test()
On Error GoTo test_Err
DoCmd.RunSQL "SELECT tblStaffMon3.StaffID, tblStaffMon3.MonthID, tblStaffMon3.SupportServicesID, tblStaffMon3.Details, tblStaffMon3.Numbers INTO tblSM FROM tblStaffMon3 WHERE (((tblStaffMon3.MonthID) Between [Forms]![frmReportStaffMon]![cboMonth1ID] And Forms!frmReportStaffMon!cboMonth2ID));, -1"
test_Exit:
Exit Function
test_Err:
MsgBox Error$
Resume test_Exit
End Function
Thanks in advance
"Characters found after end of SQL statement"
The statement is
Function test()
On Error GoTo test_Err
DoCmd.RunSQL "SELECT tblStaffMon3.StaffID, tblStaffMon3.MonthID, tblStaffMon3.SupportServicesID, tblStaffMon3.Details, tblStaffMon3.Numbers INTO tblSM FROM tblStaffMon3 WHERE (((tblStaffMon3.MonthID) Between [Forms]![frmReportStaffMon]![cboMonth1ID] And Forms!frmReportStaffMon!cboMonth2ID));, -1"
test_Exit:
Exit Function
test_Err:
MsgBox Error$
Resume test_Exit
End Function
Thanks in advance