If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"Between" "and" parameters access. How?
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 |
#2
|
|||
|
|||
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/...UBED1=ACCESS-L "rleblanc" noone@somewhere wrote in message ... 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 |
#3
|
|||
|
|||
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" noone@somewhere wrote in message ... 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 |
#4
|
|||
|
|||
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" wrote in message ... 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 |
#5
|
|||
|
|||
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" wrote in message ... 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" noone@somewhere wrote in message ... 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 |
#6
|
|||
|
|||
Yep... a typo for sure...
Thanks Van, Al Camp "Van T. Dinh" wrote in message ... 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" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|