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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass a parameter value from Access to Crystal Reports Viewer

Status
Not open for further replies.

southbean

Technical User
Jun 3, 2005
147
US
Hello All,

I’m having difficulty trying to pass a parameter from a text field on a form in my Access application to a Crystal report - which will be displayed in the Crystal Viewer.

Code:
    Dim CrxApplication As CRAXDRT.Application
    Dim CrxReport As CRAXDRT.Report
    Dim strOutputPath As String

   strOutputPath = CurrentProject.Path & "\CR_Reports\"
     ' Open the Report specified in the Open Common dialog control
    Set CrxApplication = New CRAXDRT.Application

    Set CrxReport = CrxApplication.OpenReport(strOutputPath & "CRpt", 0)

The code above works. However, I want to add a parameter to filter the report

The report is based on a Query. I have a criteria field in the query based on a text field on a form. This parameter will not pass to the Crystal report in the Crystal Viewer.

Any/all help or advice on this problem would be greatly appreciated!

Thanks,

- Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top