J
John
I am trying to open a report (rptEvaluation) with records filtered by a
filter by form proceedure on a form (frmEvaluation).
The process works fine other than when I use one of the form's combo boxes
to set the filter. These combo boxe's row sources are set to a table with
their control source set to the relevent ID field in the query underlying the
form. The filter by form works fine, however when I run the report I get a
dialogue box requesting: "Enter Parameter Value" and
"Lookup_Combo6897.SchemeName" or a reference to whichever combo box I have
used on the filter by form.
Command button onClick proceedure is:
Dim stDocName As String
stDocName = "rptEvaluation"
If Forms!frmEvaluation.Filter = "" Then
If MsgBox("No filter set. All records will show on reports. " &
Chr(10) & "Do you wish to continue?", vbYesNo) = vbYes Then
DoCmd.OpenReport stDocName, acViewPreview, ,
Forms![frmEvaluation].Filter
DoCmd.RunCommand acCmdZoom100
DoCmd.MoveSize 1500, 0, 13250, 8000
Else
Exit Sub
End If
Else
DoCmd.OpenReport stDocName, acViewPreview, ,
Forms![frmEvaluation].Filter
DoCmd.RunCommand acCmdZoom100
DoCmd.MoveSize 1500, 0, 13250, 8000
End If
Any suggestions to solve this gratefully received. Many thanks.
filter by form proceedure on a form (frmEvaluation).
The process works fine other than when I use one of the form's combo boxes
to set the filter. These combo boxe's row sources are set to a table with
their control source set to the relevent ID field in the query underlying the
form. The filter by form works fine, however when I run the report I get a
dialogue box requesting: "Enter Parameter Value" and
"Lookup_Combo6897.SchemeName" or a reference to whichever combo box I have
used on the filter by form.
Command button onClick proceedure is:
Dim stDocName As String
stDocName = "rptEvaluation"
If Forms!frmEvaluation.Filter = "" Then
If MsgBox("No filter set. All records will show on reports. " &
Chr(10) & "Do you wish to continue?", vbYesNo) = vbYes Then
DoCmd.OpenReport stDocName, acViewPreview, ,
Forms![frmEvaluation].Filter
DoCmd.RunCommand acCmdZoom100
DoCmd.MoveSize 1500, 0, 13250, 8000
Else
Exit Sub
End If
Else
DoCmd.OpenReport stDocName, acViewPreview, ,
Forms![frmEvaluation].Filter
DoCmd.RunCommand acCmdZoom100
DoCmd.MoveSize 1500, 0, 13250, 8000
End If
Any suggestions to solve this gratefully received. Many thanks.