Data Range on form

  • Thread starter Tang via AccessMonster.com
  • 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
 
L

LWD3

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top