Data Range on form

  • Thread starter Thread starter Tang via AccessMonster.com
  • Start date Start date
T

Tang via AccessMonster.com

Hi, I have a form which has 2 command buttons, they run 2 different macros to
display results on the form. The queries in the marcos require date range
input, however, the both date range are the same. I will be putting more
command buttons(macros) on the form, but they all require the same date range
input. Is there a way I can just input date range once on the form, then all
the macros are run at once instead of key in dates several times.

thanks
 
Tang via AccessMonster.com said:
Hi, I have a form which has 2 command buttons, they run 2 different macros to
display results on the form. The queries in the marcos require date range
input, however, the both date range are the same. I will be putting more
command buttons(macros) on the form, but they all require the same date range
input. Is there a way I can just input date range once on the form, then all
the macros are run at once instead of key in dates several times.

thanks
Create two text boxes.
Label one Start Date and name it txtStartDate.
Label the second one End Date and name it txtEndDate
Refer to these dates as [Forms]![frmFormName]!txtStartDate and
[Forms]![frmFormName]!txtEndDate
To use these as date ranges use:

Between [Forms]![frmFormName]!txtStartDate and
[Forms]![frmFormName]!txtEndDate
 
Back
Top