Dynamically pass parameter from form to report

scheeps

Registered User.
Local time
Today, 23:25
Joined
Mar 10, 2011
Messages
82
I'm working with Access 2010 and converted my Access project to an ADP file.

In order for me to write a report which can accept a parameter I need to write a stored procedure - which I've done.

I've got a form with a command button to open the report, but my problem is that I would like the command button to dynamically pick up the active record id (record id currently displayed on the form) and pass that through to the report as a parameter instead of the report prompting me for the record id parameter.

I'm sure someone came across this in the past - hope you guys will be able to help.
 
Can't you just use the current record ID in the form to filter the report? Use the report's On Open event to change the filter to something like:

me.filter = "recordID = " & theIDFromtheFormVariable
me.filteron = true
 

Users who are viewing this thread

Back
Top Bottom