Hi,
Per management direction, I have created a simple Access 2000 db to produce a Crystal report (V8.5). The report is only supposed to show one customer. I want to pass a parameter from my VBA code in Access (in the click event procedure of a cmd button) that will open the report with the current record. The code I have so far is:
The error I get when I run the form is "Object Required". To be honest, I'm not even sure that this is the correct way to go about this, so I'm open to any ideas you may have. I appreciate your help.
Thanks,
Lynn
Per management direction, I have created a simple Access 2000 db to produce a Crystal report (V8.5). The report is only supposed to show one customer. I want to pass a parameter from my VBA code in Access (in the click event procedure of a cmd button) that will open the report with the current record. The code I have so far is:
Code:
Dim crxApp As New CRAXDRT.Application
Dim crxRpt As CRAXDRT.Report
Dim crxDbTable As CRAXDRT.DatabaseTable
Set crxRpt = crxApp.OpenReport(App.Path & "\RptName.rpt", 1)
For Each crxDbTable In crxRpt.Database.Tables
crxDbTable.Location = App.Path & "\RptName.mdb"
Next
crxRpt.RecordSelectionFormula = "{?Parameter_Name} = " & Me.ReportID 'This is a unique identifier for each record
CRViewer.ReportSource = crxRpt
CRViewer.ViewReport
The error I get when I run the form is "Object Required". To be honest, I'm not even sure that this is the correct way to go about this, so I'm open to any ideas you may have. I appreciate your help.
Thanks,
Lynn