multipe reports, same query, one form ?

  • Thread starter Thread starter Wim
  • Start date Start date
W

Wim

Hi all,

I have several reports based on the same query. The main
difference is the lay-out of the data on the reports.
In order to filter the records in the query I use a form,
where I can control the input. I then use a button to
print the results. The code behind the button is a simple
Docmd.Openreport <reportName>.
However, is it possible to use the same form for all the
reports ? I now have one form for one report. This is not
very reusable is it ?

Anyone an idea ?

Thanks,

Wim
 
Not sure I fully understand your description, but it sounds like you have
multiple reports of the same data, and are trying to come up with a way to
select one (or another) from a form.

If so, one approach might be to use an options group to display the various
report versions, and in your button's code, change the name of the report
opened by the OpenReport command. NOTE: if you have more than 3 or 4, this
could get ugly and unwieldly.

If you have more than 3 or 4, consider adding a combo box that you use to
list the reports available. Again, when the button "clicks", have your code
look at the combo box to decide which report's name goes in the OpenReport
statement.

Good luck

Jeff Boyce
<Access MVP>
 
Thanks for your answer, it seems I'll have to do a bit of
analysis work. If I don't succeed I'll post my question
in a more comprehensive way.

Wim
-----Original Message-----
Not sure I fully understand your description, but it sounds like you have
multiple reports of the same data, and are trying to come up with a way to
select one (or another) from a form.

If so, one approach might be to use an options group to display the various
report versions, and in your button's code, change the name of the report
opened by the OpenReport command. NOTE: if you have more than 3 or 4, this
could get ugly and unwieldly.

If you have more than 3 or 4, consider adding a combo box that you use to
list the reports available. Again, when the
button "clicks", have your code
 
Not sure I understand what "analysis work" you intend to do. If you have 3
reports, you can use an options group control on your form, and in the code
behind the button, indicate which of your reports is to run, based on which
option was select...

Or have I misunderstood...

Jeff Boyce
<Access MVP>
 
Back
Top