Reports from Pass-Through Queries with Parameters

M

Mix7

Hello,
In my access database (not an access data project!)
I'm trying to create a report based on a SQL Pass-Through
Query called spReportRequest. 'spReportRequest' is a
stored procedure with parameters: @ReportId and @loc.

I can only view this procedure in the DESIGN view of a
QUERY (it looks like this, spReportRequest 7, 'A23' (where
7 is the Report ID and 'A23' is the location).

My questions is , How do I create a report so that
differing reportId's and locations can be selected?


Any help would be greatly appreciated.

Mix7
 
D

Duane Hookom

You can use DAO to change the SQL of the saved p-t query.
CurrentDb.QueryDefs("spReportRequest").SQL = "spReportRequest " &
me.txtReportID & ", '" & Me.txtLoc & "'"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top