S
shiro
Last time,below strSQL work fine for me but now,
it send error:
Too few parameter,expected 1.
Please help to find out which parameter is less.
Thank's
Shiro
strSQL = "SELECT TOP 10 " & vbCrLf & _
" Format([Date],""mmm"") AS [Month] " & vbCrLf &
_
" , Format([Date],""yyyy"") AS [Year] " & vbCrLf
& _
" , Model " & vbCrLf & _
" , Sum([" & [CboRejectItem].Column(0) & _
"]) AS [NG Qty]" & vbCrLf & _
" INTO [The Worst 10 by Reject Item tbl] " &
vbCrLf & _
" FROM [DC Fan Information Centre] " & vbCrLf &
_
" WHERE Format([Date],""mmm"")=""" &
Me.[cboMonth] & """" & vbCrLf & _
" AND Format([Date],""yyyy"")=""" & Me.[cboYear]
& """ " & vbCrLf & _
" GROUP BY Format([Date],""mmm"") " & vbCrLf & _
" , Format([Date],""yyyy"") " & vbCrLf & _
" , Model " & vbCrLf & _
" ORDER BY Sum([" & [CboRejectItem].Column(0) &
"]) DESC " & vbCrLf & _
" WITH OWNERACCESS OPTION;"
it send error:
Too few parameter,expected 1.
Please help to find out which parameter is less.
Thank's
Shiro
strSQL = "SELECT TOP 10 " & vbCrLf & _
" Format([Date],""mmm"") AS [Month] " & vbCrLf &
_
" , Format([Date],""yyyy"") AS [Year] " & vbCrLf
& _
" , Model " & vbCrLf & _
" , Sum([" & [CboRejectItem].Column(0) & _
"]) AS [NG Qty]" & vbCrLf & _
" INTO [The Worst 10 by Reject Item tbl] " &
vbCrLf & _
" FROM [DC Fan Information Centre] " & vbCrLf &
_
" WHERE Format([Date],""mmm"")=""" &
Me.[cboMonth] & """" & vbCrLf & _
" AND Format([Date],""yyyy"")=""" & Me.[cboYear]
& """ " & vbCrLf & _
" GROUP BY Format([Date],""mmm"") " & vbCrLf & _
" , Format([Date],""yyyy"") " & vbCrLf & _
" , Model " & vbCrLf & _
" ORDER BY Sum([" & [CboRejectItem].Column(0) &
"]) DESC " & vbCrLf & _
" WITH OWNERACCESS OPTION;"