Print Date Range

AN60

Registered User.
Local time
Today, 14:09
Joined
Oct 25, 2003
Messages
283
I am using two text boxes on a form to set start & end dates for a report. I wish to print the date range on the report. Any hints?
 
As is you want the dates themselves to print out on the report or you want records in the date range to print?

I'll assume records in the date range because that the more complicated of the two. In your query that the report runs off of, your Date criteria should be ' Between #[Forms]![MyForm]![StartDate]# and #[Forms]![MyForm]![EndDate] ' The syntax can be tricky and I don't guarantee I did everythign right, but the Between function is what you want..you can use the code builder to get the references to your date input fields correct.
 
Thank you for your replies. I think Graham T has what I need although I can't get it working just yet.

I am using the following in my query because I use a form to enter the "From" and "To" dates;

Between [Forms]![sale goods by date form]![txtFrom] And [Forms]![sale goods by date form]![txtTo]

In this caes entering the parameter complicates the issue a bit. Any ideas?
 
When I use, [Forms]![sale goods by date form]![txtFrom] as the parameter the report prints #Name?
 
Is the form still open when you print the report?
 
Yes the form is open when the report is run.
 
"#Name?# is printed in the unbound text box that I created which is supposed to show my selected date. I guess I am doing something wrong when I type the parameter name. I am selecting the Start and End dates using a form.
 
= "From" &" "& [Forms]![sale goods by date form]![txtFrom]&" "&"through to" &" "& [Forms]![sale goods by date form]![txtTo]


as the control source of the textbox, check the names are correct
 
Rich said:
= "From" &" "& [Forms]![sale goods by date form]![txtFrom]&" "&"through to" &" "& [Forms]![sale goods by date form]![txtTo]


as the control source of the textbox, check the names are correct

AN60,

Also make sure that you haven't given the unbound text box the same name as one of your fields. If you have, simply rename it and the problem should be solved.
 
Rich & Graham T
Thank you both, your help did the trick.

To others who posted, thank you also. I appreciate your contributions.
 

Users who are viewing this thread

Back
Top Bottom