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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW CAN I SHOW THE PARMETER DATES IN MY REPORT??? 1

Status
Not open for further replies.

chubby

Programmer
Apr 28, 2001
278
0
0
US
All my reports are based on parameter queries. My end users needs to be able to see the parameter date range in which they requested also printed on the report.

So an example would be if they ask for all the personnel who checked into the clinic between 10/01/00 to 10/01/01. The query would return names of the personnel that checked into the clinic for that date range and the specified parameter date range printed at the top of the report.

Thanks B-(
 
Hi!

Instead of using parameter queries set the criteria of the query to text boxes on a form. Allow the user to enter the dates on the form and then press a button on the form to open the report. Now the report can access the dates from the still open form.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Thanks Jeff for the tip. But I still don't understand.>:-<
The db I have been ask to work on has about 100,000 records or more and 83 reports query. So there's know way of adding the parameter date without making majors changes to the reports or query????
 
Hi again!

Sorry, to my knowledge you can't get at the values entered in the parameter box of a query. That is why I suggested passing the parameters through forms because then the report can access the information. There is a way to use variables in a query, but I can't remember the syntax off the top of my head. Even so, maybe you will find that they will help. If you are looking for more on how to set up the forms and point the query criteria to them, let me know.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Hi there,

Can I put in my two cents worth?

I've found that I can display the parameter dates in the report heading by following these instructions that are found in Access Help.

1) Create the criteria parameters in the report's underlying query.

How?

2) Open the report in Design view.

3) Create an unbound text box for each parameter you want to display. Click the Text Box tool in the toolbox, and then click in the report header.

4) To display the property sheet, make sure the text box is selected, and then click Properties on the toolbar.

5) Set the ControlSource property to the parameter(s) you specified in the Criteria cell in the query.

For example, if the parameters in the query are:

Between [Type a beginning date] And [Type an ending date]
and you want to display them in two text boxes, set the ControlSource property of one text box to:

[Type a beginning date]

and the ControlSource property of the other text box to:

[Type an ending date]

If you want to display the parameters in one text box, you can use an expression in the ControlSource property box; for example:

=&quot;Between &quot; & [Type a beginning date] & &quot; and &quot; & [Type an ending date]

Microsoft Access displays the parameter values exactly as you typed them in the prompt.

5) To see the criteria, print or preview the report.

 
Here's another option (simplier??) - after you have the parameter query run but before you run the report insert a query that gets the min and max of the parameter date field, link to the results of the parameter query, and in your report header you will say &quot;From [minParameterdate]&quot; or whatever you named your field &quot;to [maxParameterdate], so it's dynamic and changes each time the parameter is queried! Note use correct syntax to concantenate your fields with the From and to statements or put in separate unbound text boxes.
 
This thread will walk you through designing a form to take your date range input and use that input for your reports:

thread703-234319 - - - -

Bryan
 
Continued from above . .

Once you have the form properly working with your query as noted in the referenced thread, you can place unbound boxes on the report with the control source set to the variables to which the dates were passed on the form. This will show the beginning and end dates on the report. - - - -

Bryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top