Date span printed on run (1 Viewer)

selenau837

Can still see y'all......
Local time
Today, 00:27
Joined
Aug 26, 2005
Messages
2,211
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

...the Myth Buster
Local time
Yesterday, 23:27
Joined
Jun 29, 2001
Messages
396
selenau837 said:
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

Can still see y'all......
Local time
Today, 00:27
Joined
Aug 26, 2005
Messages
2,211
Matty said:
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
Code:
Between [Begin Date] And [End Date]
as a critieria for one field in my query.
 

Matty

...the Myth Buster
Local time
Yesterday, 23:27
Joined
Jun 29, 2001
Messages
396
selenau837 said:
I have it as parameters for one field in the query.

I have
Code:
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

Can still see y'all......
Local time
Today, 00:27
Joined
Aug 26, 2005
Messages
2,211
Matty said:
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
Code:
=[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

...the Myth Buster
Local time
Yesterday, 23:27
Joined
Jun 29, 2001
Messages
396
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

Can still see y'all......
Local time
Today, 00:27
Joined
Aug 26, 2005
Messages
2,211
Matty said:
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

...the Myth Buster
Local time
Yesterday, 23:27
Joined
Jun 29, 2001
Messages
396
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

Can still see y'all......
Local time
Today, 00:27
Joined
Aug 26, 2005
Messages
2,211
selenau837 said:
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

...the Myth Buster
Local time
Yesterday, 23:27
Joined
Jun 29, 2001
Messages
396
Yeah, you're controlsource should be something like:

=Format([BeginDate],"your format here")...
 

selenau837

Can still see y'all......
Local time
Today, 00:27
Joined
Aug 26, 2005
Messages
2,211
Matty said:
Yeah, you're controlsource should be something like:

=Format([BeginDate],"your format here")...

Code:
=Format([Begin Date],mmmm dd", "yyyy & " and " & Format[End Date],mmmm dd", "yyyy)

Not liking it.
 
Last edited:

Matty

...the Myth Buster
Local time
Yesterday, 23:27
Joined
Jun 29, 2001
Messages
396
Try this:

=Format([Begin Date],"mmm d"", ""yyyy") & " and " & Format([End Date],"mmm d"", ""yyyy")
 

selenau837

Can still see y'all......
Local time
Today, 00:27
Joined
Aug 26, 2005
Messages
2,211
Matty said:
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.
 

Users who are viewing this thread

Top Bottom