View Full Version : Date span printed on run
selenau837 05-10-2006, 11:14 AM I have a report that is based on a query. Before the query runs, it ask for a date span as it criteria.
Exp 01/01/06 - 3/1/06.
How do I make that criteria from that query fill a text box. They want the date span they put in as the criteria to be placed at the top of the report.
Thanks in advance.
Matty 05-10-2006, 11:20 AM I have a report that is based on a query. Before the query runs, it ask for a date span as it criteria.
Exp 01/01/06 - 3/1/06.
How do I make that criteria from that query fill a text box. They want the date span they put in as the criteria to be placed at the top of the report.
Thanks in advance.
In your query, have you put in parameters like [From:] and [To:]? If so, you should be able to put those into textboxes on the report by typing in the exact same names.
selenau837 05-10-2006, 11:22 AM In your query, have you put in parameters like [From:] and [To:]? If so, you should be able to put those into textboxes on the report by typing in the exact same names.
I have it as parameters for one field in the query.
I have Between [Begin Date] And [End Date] as a critieria for one field in my query.
Matty 05-10-2006, 11:25 AM I have it as parameters for one field in the query.
I have Between [Begin Date] And [End Date] as a critieria for one field in my query.
So then you just need two textboxes on your report. One that contains [Begin Date] and another with [End Date]. I can't remember if you need an = before the bracket...
selenau837 05-10-2006, 11:29 AM So then you just need two textboxes on your report. One that contains [Begin Date] and another with [End Date]. I can't remember if you need an = before the bracket...
Yes, but that requirs the paramater to be answered twice.
I did this =[BeginDate] & " " & [EndDate] but it asked for the date span twice.
How do I pull from the first set of paramaters given the first time. ??
Matty 05-10-2006, 11:32 AM They have to be spelled exactly the same. It looks like you've got [Begin Date] in the query and [BeginDate] on the report. You either need to put the space on the report or take out the space in the query.
selenau837 05-10-2006, 11:33 AM They have to be spelled exactly the same. It looks like you've got [Begin Date] in the query and [BeginDate] on the report. You either need to put the space on the report or take out the space in the query.
You're awsome!! Thanks.......:D
Matty 05-10-2006, 11:37 AM No problem -- I've had that problem numerous times. I've actually abandoned using the parameters in the query and instead referencing a textbox on a form where the user enters a date. They work the same way.
selenau837 05-10-2006, 11:40 AM You're awsome!! Thanks.......:D
Ok, last thing I promise...well maybe not
They want the date to show as Jan 1, 2006. I've change the format to show custom, but it is not changing it since it is putting it there based on that input box. Do I change the format in the control source?
Matty 05-10-2006, 11:42 AM Yeah, you're controlsource should be something like:
=Format([BeginDate],"your format here")...
selenau837 05-10-2006, 11:44 AM Yeah, you're controlsource should be something like:
=Format([BeginDate],"your format here")...
=Format([Begin Date],mmmm dd", "yyyy & " and " & Format[End Date],mmmm dd", "yyyy)
Not liking it.
Matty 05-10-2006, 11:52 AM Try this:
=Format([Begin Date],"mmm d"", ""yyyy") & " and " & Format([End Date],"mmm d"", ""yyyy")
selenau837 05-10-2006, 11:54 AM Try this:
=Format([Begin Date],"mmm d"", ""yyyy") & " and " & Format([End Date],"mmm d"", ""yyyy")
You are my hero!!!
I was in the motion of formatting that field on the load event of the report if you hadn't of given me that. I used the help files and found that as an option. Thank you again.
Matty 05-10-2006, 11:54 AM I'll take that. :D
|