AllExperts > Experts 
Search      

Using MS Access

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scottgem
Expertise
I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience
I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > Print Parameter on a Report

Topic: Using MS Access



Expert: Scottgem
Date: 7/25/2008
Subject: Print Parameter on a Report

Question
When I run an Access report I have a start-date and end-date parameters associated with the underlying query. Upon execution of the report, a dialog box appears asking for values for each parameter. I supply values and my report selects data in the range specified. Is there a way that I can print on the report header the parameter values I entered to run the report?

Answer
Yes, but not by using a parameter prompt report such as you have. Frankly, I almost never use parameter prompts in queries, and this is one of the reasons.

What you need to do is create an unbound form with two textboxes (call them txtStart and txtEnd). go back to your query and change the criteria to:

BETWEEN Forms!formname!txtStart AND Forms!formname!texEnd

Add a button to the for to run the report. Finally, add unbound controls to your report and set the controlsources to:

=forms!formname!txtstart and txtEnd respectively

Add a button on the form to run the report.

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.