How do I add a date range to a report header?

  • Thread starter Thread starter connections
  • Start date Start date
C

connections

Guest
Hi,

I have generated a report which displays information sorted by its date field
but I would like a way of having the range of dates written in the title:

e.g. report showing dates from xx/xx/xx to yy/yy/yy
_____________________________________________

Any ideas much appreciated .

Cheers. :confused:
 
Do you input a specific date range when you pull up your report (set in the query)? Because if you do then you can create a text box in your header with the control source set to:

="Between " & [Type a Start Date] & " and " & [Type an end date]

(or type whatever your prompt wording is between the brackets.)

Hope this helps!
~Lith
 
That didn't work for me. It prompted (for a second time) the Start and End dates.

Created text box. Opened Properties. Selected Control Source. Pasted above code. Saved.
 
DurhamCons said:
That didn't work for me. It prompted (for a second time) the Start and End dates.

Created text box. Opened Properties. Selected Control Source. Pasted above code. Saved.

GOT IT! I couldn't just cut and paste because my query code didn't match verbatim. Thanks!
 
Last edited:
Cant use that way because I'm not generating the report from a query.

Basically I've got a form which allows you to input date ranges for the report as well as specify other criteria that should match. The user hits a button which runs some sql in the background. The sql does a SELECT JOIN query and stores the results in a table. The report has been designed to take as its data source this table, so finally I've coded the form to make the report pop up automatically.

I'm using MS Access 2000 by the way.

I've tried putting DATE into a text box in the report header but this only shows the first date in the report. I need a way of also showing the last or greatest date.

Cheers.
 
Two different ways

Solution 1:
When your queries run to build a table, bring in the dates from the form into the table, and then when the report runs, you can use the dates field from the table.

Solution 2:
Keep the form open when the queries build the data, and then the report and have the report grab the dates from the form.

either way, you reference the form!myFormName.[ControlName] in the query or the report. . .

your choice.

sportsguy
 

Users who are viewing this thread

Back
Top Bottom