Report Periods

G

Guest

Trying to programmatically capture the [Enter start date here] and the [Enter
end date here] values from a query to display on a report. How do I capture
these fields for display on the report to show the period the report covers?
Do I give them some expression name in the SQL?
Earl Phillips
Ex-Mainframer, Volunteer Access Programmer
Harvesters Community Food Bank
 
G

Guest

A better way to do this would be to enter the dates on the form. You can
change the criteria in your query from [Enter start date here] to
[forms]![MyFormName]![txtStartDate] and the same for end date. Then in the
text boxes where you want the dates to show make the control source for the
dates [forms]![MyFormName]![txtStartDate] and the same for end date.
 
F

fredg

Trying to programmatically capture the [Enter start date here] and the [Enter
end date here] values from a query to display on a report. How do I capture
these fields for display on the report to show the period the report covers?
Do I give them some expression name in the SQL?
Earl Phillips
Ex-Mainframer, Volunteer Access Programmer
Harvesters Community Food Bank

Add an unbound control to the Report Header.
Set it's control source to:
= "For sales between " & [Enter start date here] & " and " & [Enter
end date here]

The text between the brackets must be identical to the text between
the brackets in the query.
 
G

Guest

This worked just as the user wanted. This is one of those answers I will
secret away for the future as I have never found this explained anywhere
else. Thank you very, very much. I believe the prior response required that
I change to a form rather than keep it as a report, and there are many things
a report does that a form does not.

Thanks again for everyone's help. It has greatly expanded my understanding
of Access.

Earl Phillips
Ex-Mainframer, Vol. Access Programmer
Trying to make the food bank more efficient
so we can feed the hungry less expensively and
with efficient ways.
--
Trying To Feed The Hungry


fredg said:
Trying to programmatically capture the [Enter start date here] and the [Enter
end date here] values from a query to display on a report. How do I capture
these fields for display on the report to show the period the report covers?
Do I give them some expression name in the SQL?
Earl Phillips
Ex-Mainframer, Volunteer Access Programmer
Harvesters Community Food Bank

Add an unbound control to the Report Header.
Set it's control source to:
= "For sales between " & [Enter start date here] & " and " & [Enter
end date here]

The text between the brackets must be identical to the text between
the brackets in the query.
 

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