show date parameters in report

  • Thread starter Thread starter heavenlyhost1
  • Start date Start date
H

heavenlyhost1

The report I'm creating is from a query which has a parameter in the date
field so that the user can select a start date and end date. I would like
the start date and end date to also show on the report. Can this be done?
 
Add two calculated fields to your report's query, one for each parameter.
Bind textboxes on the report to those two fields to display them.

For example:

SELECT *, [Enter Start Date:] AS StDate,
[Enter End Date:] AS EnDate
FROM YourTableName
WHERE YourDateField Between [Enter Start Date:] And
[Enter End Date:];
 
Thank you so much for sending this. I was confused at first because "put the
same thing you have in your query's criteria" threw me off. I kept trying to
put the Between [Enter Start Date] and [Enter End Date] in the text box but
this didn't work. All I had to put in the Control Source was [Start Date] in
one text box and [End Date] in the other text box. Works beautifully, but
without your suggestion, I would not have figured it out. Thanks. again.
 
While this probably would have helped someone who knows SQL or VB, I do not,
so I couldn't figure out where to put this and kept getting all kinds of
errors because I didn't know what I was doing. I need more basic
instructions with plenty of detail. I was able to figure it out using
tkelleys help, even though I had a little trouble with hers, but it did
enable me to eventually figure it out. So thank you so much for trying to
help me. It was my fault that I was unable to figure it out.

Ken Snell MVP said:
Add two calculated fields to your report's query, one for each parameter.
Bind textboxes on the report to those two fields to display them.

For example:

SELECT *, [Enter Start Date:] AS StDate,
[Enter End Date:] AS EnDate
FROM YourTableName
WHERE YourDateField Between [Enter Start Date:] And
[Enter End Date:];

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


heavenlyhost1 said:
The report I'm creating is from a query which has a parameter in the date
field so that the user can select a start date and end date. I would like
the start date and end date to also show on the report. Can this be done?
 
Back
Top