"Between" "and" parameters access. How?

  • Thread starter Thread starter rleblanc
  • Start date Start date
R

rleblanc

I have several reports which ask for a "Start Date" and an "End Date" for
use in determining the period of time the report is to show data for. For
this I use the "Between" and "and" function to request from the user what
period of time to display data for.

However, I would like to be able to show at the top of the report the period
covered by the report such as:

Report for start date: mm/dd/yyyy to: mm/dd/yyyy

How do I access the "Start Date" and "End Date" which were entered as part
of a select query? Does Access have a special name for these values? How can
these parameters be accessed for use in the report?

Thanks
 
You would be doing yourself a big favor if you created a form which had
textboxes for entering the start and end dates. Then have a button on the
form that opens the report. The query behind the report would reference the
form for their values, then you can also reference the form in a textbox on
the report for the same values.

On my website (www.rogersaccesslibrary.com) is a small Access sample
database called: "ParaQuerySelect2k.mdb", which illustrates how.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
You can refer to the parameter values on a report by just using the
parameter...
In this case the [Start Date] parameter can be displayed on the report by
using a control with = [Start Date].
Or concatenate for a better look...
= "Between " & [Start Date] " and " & [End Date]
would display as Between 1/1/04 and 2/1/04
Use them just like a table field...
hth
Al Camp
 
I think there is a missing ampersand. Try:

= "Between " & Format([Start Date], "mm/dd/yyyy") &
" and " & Format([End Date], "mm/dd/yyyy")

(typed as one line in Access)
 
Thanks! This works great!

I just set up two text control boxes, and used the lables for the text box
for text as follows:

From start date: mm/dd/yyyy to: mm/dd/yyyy

And put "StartDate" and "EndDate" in the text boxes themselves. This worked
out perfectly!

Thanks again!



AlCamp said:
You can refer to the parameter values on a report by just using the
parameter...
In this case the [Start Date] parameter can be displayed on the report
by
using a control with = [Start Date].
Or concatenate for a better look...
= "Between " & [Start Date] " and " & [End Date]
would display as Between 1/1/04 and 2/1/04
Use them just like a table field...
hth
Al Camp

rleblanc said:
I have several reports which ask for a "Start Date" and an "End Date" for
use in determining the period of time the report is to show data for.
For
this I use the "Between" and "and" function to request from the user what
period of time to display data for.

However, I would like to be able to show at the top of the report the period
covered by the report such as:

Report for start date: mm/dd/yyyy to: mm/dd/yyyy

How do I access the "Start Date" and "End Date" which were entered as
part
of a select query? Does Access have a special name for these values? How can
these parameters be accessed for use in the report?

Thanks
 
Yep... a typo for sure...
Thanks Van,
Al Camp

Van T. Dinh said:
I think there is a missing ampersand. Try:

= "Between " & Format([Start Date], "mm/dd/yyyy") &
" and " & Format([End Date], "mm/dd/yyyy")

(typed as one line in Access)

--
HTH
Van T. Dinh
MVP (Access)


AlCamp said:
You can refer to the parameter values on a report by just using the
parameter...
In this case the [Start Date] parameter can be displayed on the
report
by
using a control with = [Start Date].
Or concatenate for a better look...
= "Between " & [Start Date] " and " & [End Date]
would display as Between 1/1/04 and 2/1/04
Use them just like a table field...
hth
Al Camp
 
Back
Top