How do I get the date range onto a report

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
 
T

Tom Lake

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
 
D

DebbieG

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
 
G

Guest

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
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top