Passing a parameter value using OCX
Dear All
I have a form from which the user selects a PO Number. This PO Number is
stored in a variable, called strPONumber, which I am trying to use with the
ParameterFields property as follows:
With CrystalReport1
.ReportFileName = App.path & "\PO.RPT"
.Connect = App.path & "\PO.MDB"
.DiscardSavedData = True
.RetrieveDataFiles
.ParameterFields(0) = "PONumber;' " & strPONumber & " ';TRUE"
'<<<<< problem???!!!
.ReportSource = crptReport
.ReportTitle = "Purchase Order ' " & strPONumber & " ' "
.Destination = crptToWindow
.PrintFileType = crptCrystal
.Action = 1
End With
However, I am prompting for the parameter value, even though I have set the
SetDefaultValue = TRUE.
Is my syntax for ParameterFields correct? Why do I keep being prompted?
Rgds
Daisy