"Enter Parameter Value" shows OpenReport Parameter

Pisteuo

Registered User.
Local time
Today, 08:58
Joined
Jul 12, 2009
Messages
72
"Enter Parameter Value" is prompted by DoCmd.OpenReport based on criteria from a combo box. The prompt box shows the criteria.

Here is the VBA:

Private Sub btnCCFSReport_Click()

Dim strDocName As String
Dim strCriteria As String

strDocName = "rptCCFSReport"
strCriteria = "fldPkg =" & Me!cmbPkg


DoCmd.OpenReport strDocName, acViewPreview, , strCriteria

End Sub

The Me!cmbPkg value is showing in the prompt box, not the field of which that value is associated. So it's not prompting "fldPkg", but the data criteria.

The report is based on a query with Where statements which includes the field in which the criteria is associated.

I repeat the same data in the prompt and the report runs as desired.

How can I solve this prompt box issue?

Thank you.
 

Users who are viewing this thread

Back
Top Bottom