Solved

Using Input Form to Run Multiple Reports

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS ACCESS 2010 Clear Form Button 4 61
Access2016 ignore hyphen in data entry or searches 5 41
Access Query Top 20 from subquery 11 39
Clear Current Value from Combobox 2 24
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

713 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