Solved

Using Input Form to Run Multiple Reports

Posted on 1998-06-15
1
161 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

856 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