468,457 Members | 1,801 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

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 1212

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
1 post views Thread by subhajit12345 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.