Prompting forReport Input

  • Thread starter Thread starter Jim Pockmire
  • Start date Start date
J

Jim Pockmire

When opening a report, is it possible to open a window prompting for info
that will be used in the report? I know a parameter query as the report
source will do this, but that is not an option in this case.
 
When opening a report, is it possible to open a window prompting for info
that will be used in the report? I know a parameter query as the report
source will do this, but that is not an option in this case.

Jim,
I don't know what kind of info you want to get, so here is a generic
method.

In the Report code window's Declaration's section:
Dim strInfo as String

In the Report's Open event:

strInfo = InputBox("What do I need to know?","Get Info")

You can then use strInfo anywhere in your report.

You can also use a control on a form to input the data into, then
refer to that control in your report, using an unbound control.
Set the control source to:
= forms!FormName!ControlName
No code needed for this method.
The form must remain open when the report is run.
 
Back
Top