Here is a snippet that I use to pass parameter values. Hope it helps.
dim appCr As CRAXDRT.Application
dim repForm As CRAXDRT.Report
Dim crxParamDefs As CRAXDRT.ParameterFieldDefinitions
Dim crxParam As CRAXDRT.ParameterFieldDefinition
dim Parameter1Value, Parameter2Value 'dim to match the parameter type
Parameter1Value=value from your control (eg, txtP.text)
Parameter2Value=value from your control2
sRPTpath = path to rpt file
Set repForm = appCr.OpenReport(sRPTpath,
Set crxParamDefs = repForm.ParameterFields
For Each crxParam In crxParamDefs
With crxParam
Select Case .ParameterFieldName
Case "Parameter1"
.AddCurrentValue Parameter1Value
Case "Parameter2"
.AddCurrentValue Parameter2Value
End Select
End With
Next