我写了这段代码,但它有这个错误。
“运行时错误‘20553’:参数字段名无效”
谁能帮我解决它?
With CR
.ParameterFields(0) = "start;" + CStr(Form1.cmbMonth.Text) & ";True"
.ParameterFields(1) = "end;" + CStr(Form1.cmbYear.Text) & ";True"
.ReportFileName = App.Path & "\Report\Report1.rpt"
.SelectionFormula = "{SW.dtaMonth}>=date('" & Format(Form1.cmbMonth.Text) & "') and {SW.dtaYear}<=date(" & Format(Form1.cmbYear.Text) & ")"
.WindowTitle = "PG Variable Overhead Report" 'title of report
.Action = 1 'Will Show The Report
End With