Solved

Using Input Form to Run Multiple Reports

Posted on 1998-06-15
1
160 Views
Last Modified: 2008-07-03
I have created an input form which has the following fields: start date and end date.  These are the parameters for the reports.  My problem is that I have seven different reports using this same form.

My question is how do I go from this form to the specific report I want?  I know that I could make seven different dialog boxes for each report but this is time consuming and cumbersome.

Any help would be appreciated.
0
Comment
Question by:ecohouse
1 Comment
 
LVL 8

Accepted Solution

by:
Helicopter earned 50 total points
ID: 1975407
Unless you are using macros you probably already have code to print each report. Create a subroutine in a module that includes the code for your input box and your print report code. Pass the subroutine the name of the report you want to print and refer to this in the docmd.openreport statement.
e.g.
public sub testprint(strReportname as string)

'inputbox code here

DoCmd.OpenReport strReportName ,,"[startdate]=" & inputStart & " AND [enddate]=" & inputEnd  'or whatever code you are using for your existing report

end sub
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question