L
LeslieJ via AccessMonster.com
I have a form that counts the number of records created each month. I have a
combo box that has a list of years, 1;2007;2;2008;3;2009;4;2010. I have a
combo box that lists the months,
1;"January";2;"February";3;"March";4;"April";5;"May";6;"June";7;"July";8;"August";9;"September";10;"October";11;"November";12;"December".
After the month combo box is updated, there are two hidden text boxes that
are updated to be the first of the month and the last of the month.
Code is:
Me.txtStartDate = DateSerial(Year(), Me.cboMonth.Column(0), 1)
Me.txtEndDate = DateSerial(Year(), Me.cboMonth.Column(0) + 1, 0)
However, now that it is the new year I realized my super plan failed ) The
year in the code obviously takes this year, and doesn't take into account the
year combo box selection.
How can I make it acknowledge the option selected in the year combo box and
concactenate it with the date serial code?
combo box that has a list of years, 1;2007;2;2008;3;2009;4;2010. I have a
combo box that lists the months,
1;"January";2;"February";3;"March";4;"April";5;"May";6;"June";7;"July";8;"August";9;"September";10;"October";11;"November";12;"December".
After the month combo box is updated, there are two hidden text boxes that
are updated to be the first of the month and the last of the month.
Code is:
Me.txtStartDate = DateSerial(Year(), Me.cboMonth.Column(0), 1)
Me.txtEndDate = DateSerial(Year(), Me.cboMonth.Column(0) + 1, 0)
However, now that it is the new year I realized my super plan failed ) The
year in the code obviously takes this year, and doesn't take into account the
year combo box selection.
How can I make it acknowledge the option selected in the year combo box and
concactenate it with the date serial code?