Hi all,
I think I'm making a schoolboy error here but I can't see it.
It is giving me a 'Run-time error: 3061' - Too Few parameters. Expecting 1'
Can someone give me any advice please?
Private Sub cmdMonth_Click()
Dim wks As Workspace
Dim dbs As Database
Dim strMonthSQL As String
Set wks = Workspaces(0)
Set dbs = CurrentDb
strMonthSQL = "SELECT tblSettledAudit.*, * INTO tblSettledReporter "
strMonthSQL = strMonthSQL + "FROM tblSettledAudit LEFT JOIN tblAuditList "
strMonthSQL = strMonthSQL + "ON tblSettledAudit.strClaimNo = tblAuditList.strClaimNo "
strMonthSQL = strMonthSQL + "WHERE tblAuditList.dtmMonth = [Forms]![fmnuMonthSelect]![cboSelector];"
dbs.Execute strMonthSQL, DB_FAILONERROR
dbs.Close
End Sub
I think I'm making a schoolboy error here but I can't see it.
It is giving me a 'Run-time error: 3061' - Too Few parameters. Expecting 1'
Can someone give me any advice please?
Private Sub cmdMonth_Click()
Dim wks As Workspace
Dim dbs As Database
Dim strMonthSQL As String
Set wks = Workspaces(0)
Set dbs = CurrentDb
strMonthSQL = "SELECT tblSettledAudit.*, * INTO tblSettledReporter "
strMonthSQL = strMonthSQL + "FROM tblSettledAudit LEFT JOIN tblAuditList "
strMonthSQL = strMonthSQL + "ON tblSettledAudit.strClaimNo = tblAuditList.strClaimNo "
strMonthSQL = strMonthSQL + "WHERE tblAuditList.dtmMonth = [Forms]![fmnuMonthSelect]![cboSelector];"
dbs.Execute strMonthSQL, DB_FAILONERROR
dbs.Close
End Sub