471,120 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

How to pass parameters to Access report via Automation 2

I would like to pass multiple parameters from a VB.NET application to an
existing Access 2003 application's reports (essentially using Access as a
report writer where the reports already exist).
The reports' datasource is a stored procedure with multiple @parameters.

This code works where the report requires no parameter:
Dim strAccessDBPath As String
Dim booReturn As Boolean = False
strReportName = "rptCMOTeam1"
strAccessDBPath = "W:\Clinical Services Database\Clinical
booReturn = OLEPreviewReport(strDB, strReportName)

A Microsoft example shows using a single parameter:
booReturn = OLEPreviewReport(strDB, strReportName),
strWhere:="OrderId = 10251")

Would "OrderId" feed into a @OrderID parameter in a stored procedure, or is
there another way to replace the strWhere clause to feed the @parameters in
the stored procedure?

Dean Slindee

Nov 21 '05 #1
0 1272

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Tom Weddell | last post: by
6 posts views Thread by Woody Splawn | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.