How do I get the date range onto a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've set up a simple query to present records for user selected date ranges.
ie - the user can choose one days worth of records, a weeks or a months etc.
I now want that date range to appear on the report that's produced. I would
hate to have my 'customer' have to hand write the range once it's printed
 
Sue Compelling said:
I've set up a simple query to present records for user selected date
ranges.
ie - the user can choose one days worth of records, a weeks or a months
etc.
I now want that date range to appear on the report that's produced. I
would
hate to have my 'customer' have to hand write the range once it's printed

Here's how I do it. I create two calculated fields, one for [Enter From
Date] and one for [Enter To Date] then I refer to their aliases (Here called
[From] and [To]) on the report.

SELECT Master.Name, Master.DOB, [Enter From Date] AS [From], [Enter To Date]
AS [To]
FROM Master
WHERE (((Master.DOB) Between [Enter From Date] And [Enter To Date]));

Tom Lake
 
Create a Text Box in your report header and in the Control Source type
something like this:

=[YourBeginParameter] & " - " & [YourEndParameter]

HTH,
Debbie


| I've set up a simple query to present records for user selected date
ranges.
| ie - the user can choose one days worth of records, a weeks or a months
etc.
| I now want that date range to appear on the report that's produced. I
would
| hate to have my 'customer' have to hand write the range once it's printed
 
Thanks so much for taking the time to reply Tom. I've got four replies and
four differenreplying

Tom Lake said:
Sue Compelling said:
I've set up a simple query to present records for user selected date
ranges.
ie - the user can choose one days worth of records, a weeks or a months
etc.
I now want that date range to appear on the report that's produced. I
would
hate to have my 'customer' have to hand write the range once it's printed

Here's how I do it. I create two calculated fields, one for [Enter From
Date] and one for [Enter To Date] then I refer to their aliases (Here called
[From] and [To]) on the report.

SELECT Master.Name, Master.DOB, [Enter From Date] AS [From], [Enter To Date]
AS [To]
FROM Master
WHERE (((Master.DOB) Between [Enter From Date] And [Enter To Date]));

Tom Lake
 
Hi Tom, thanks so much for taking the time to reply. I've got four replies
and four different ways of doing this now - all of which will take me some
time to understand. That's the problem with being self-taught huh - a little
knowledge being a dangerous thing. Cheers Sue

Tom Lake said:
Sue Compelling said:
I've set up a simple query to present records for user selected date
ranges.
ie - the user can choose one days worth of records, a weeks or a months
etc.
I now want that date range to appear on the report that's produced. I
would
hate to have my 'customer' have to hand write the range once it's printed

Here's how I do it. I create two calculated fields, one for [Enter From
Date] and one for [Enter To Date] then I refer to their aliases (Here called
[From] and [To]) on the report.

SELECT Master.Name, Master.DOB, [Enter From Date] AS [From], [Enter To Date]
AS [To]
FROM Master
WHERE (((Master.DOB) Between [Enter From Date] And [Enter To Date]));

Tom Lake
 
Hi Debbie, thanks so much for taking the time to reply - and for letting me
know in the General Group that I'd already had postings. [First time user,
though am starting to get the hang of this]. As you can see, I've got four
replies and four different ways of doing this now - all of which will take me
some time to understand. That's the problem with being self-taught huh - a
little knowledge being a dangerous thing. Cheers Sue
 
Back
Top