Parameter help

  • Thread starter Thread starter AmandaH
  • Start date Start date
A

AmandaH

I am trying to write a VB macro that will allow me to open up several
reports under one parameter.

For example I have 7 Reports, where the primary Key is ProjectNumber,
I want to be able to click a button and have a pop-up box asking the
user to enter a project number. I then want to take that value and
apply to each of the 7 reports, having each report open in print
preview. Where the only record in each report is equal to that of the
project number enter by the user.


I know that I could base this on a query parameter for each report;
however then the user would have to enter the project number 7 times
with is kind of a waste of time.


Any ideas would be great


Thanks
~Amanda~
 
Amanda

If each of the queries can refer to a single form for their selection
criterion/parameter, you would only need to enter the value one time.

You will need a form in which to enter the value (into a control), and that
form will need to remain open (even if hidden) so the queries/reports can
run.

A pop-up is one way to do it (but you need to not close that form). Another
way would be to add an unbound control to a form you would already have
open, and have each of the queries "point" to that form's control (e.g.,
Forms!YourForm!YourProjectNumber).

By the way, if you haven't already considered it, users generally find it
easier to pick an item from a list than to remember a code/number. Giving
the user a combo box to select from may be more user-friendly than a
"fill-in-a-textbox".

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top