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

How to pass a parameter from MS Access 2000 to Crystal Reports

Status
Not open for further replies.

cnd

Programmer
Sep 2, 2002
4
CA
Hello,
I want to pass a parameter from MS Access 2000 form to Crystal Reports just so the users don't have to enter the parameter values for the reports every time they run my app.
Could someone help, please?
Thanks
cnd
 
something like this maybe ?


Sub Sample()
'Set Reference to: Microsoft Access 9.0 Object Library

Dim frm As Form
Dim ctrl As Control
Dim strParameter As String

Set frm = Forms("Form1")
Set ctrl = frm.Controls("txtParam")

strParameter = ctrl.Properties("Text")

Report.ParameterFields("rptField").SetCurrentValue (strParameter)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top