Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting parameters entered to appear on a page header?

Status
Not open for further replies.

Tmconsult

IS-IT--Management
Jul 25, 2001
88
0
0
US
I have a report which is based on a query. in this query there is a date field and you need to enter a parameter for a starting date and an ending date so I used: Between [start] and [End]. the query works fine and so does the report. I would just like in the page header of the report the dates which the user enters as parameters. so if they entered 1/1/01 and 1/31/01, it would pop up in the header. can I reference these somehow.
 

Add the [Start date] and [End date] as fields with alias names in the query like this.

Select
col1, col2, col3, ... coln,
colStart: [Start date], colEnd: [End date]
From table
Where col3 Between [Start date] And [End date]

You can then reference colStart and colEnd on the report. There are other ways to do what you want but this is simple and easy to implement. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Create a new text box in the header and for its control source, type:
=[start] & " and " & [end] ruth.jonkman@wcom.com
 
Hey Ruth, I flagged this because I was interested in the same thing. I tried your suggestion, but there is one problem. When you do it this way the prompt gets repeated so you have enter 2 starts and 2 ends.
-Smack
 
The query directly feeding the report must be the query with the parameters, so if you have a query that runs before the query that feeds the report and you put the parameters there, it won't work. Otherwise her method works exactly as she described if you enter in exactly the same text for the report in brackets as you have in the criteria in brackets. Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top