Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type mismatch with .ParameterFields.AddCurrentValue

Status
Not open for further replies.

dafty

Programmer
Jul 21, 2001
40
0
0
TH
I have to use Parameter in my report . but found a problem "Type mismatch" when it run to commented line under.

------------------------------------------
Dim App1 As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report

Set Report = App1.OpenReport("report1.1.rpt")
Report.ParameterFields(&quot;MinCode&quot;).AddCurrentValue CStr(txtCode.Text) '<<-- This Bug Line
CRViewer9.ReportSource = Report
CRViewer9.ViewReport
-------------------------------------------------
What solution i need for this?

----------------------------------
[daftywork : work 4 everyone.]
>>
 
You need to create a parameter value object first, then set the value of that object. Then use the parameter value object instead of your crst(...)

Sorry not enough time to give some sample code

Andrew Baines
Chase International
 
i already have a solution now. However, Thank you for your answer.

----------------------------------
[daftywork : work 4 everyone.]
>>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top