I am currently populating a combo box on Form Load with 14 day interval between date. The users change the date using the
drop down arrow of the combo box.
I want to change the interface to allow user to change the Dates using two command buttons
named cmdNext and cmdPrevious.
I figured I would populate a text box value using
But I ran into the issue that the cmdNext click event would not be able to change the date because that code was placed in
the Control Source. I then tried "select startdate from tblpayperiod" because I create a table called tblpayperiod and placed the startdate there but then when my for loaded I got #Name?
How can I create this interface? Is there a way to use the combo box but not have the drop down arrow appear? Any Ideas or thoughts? I am stalled on getting the startdate on the form
following code on the cmdNext click event
drop down arrow of the combo box.
Code:
Private Sub Form_Load()
Dim startDate As Date
startDate = CDate("5/20/2006")
cboPPStartDate.AddItem startDate
Do While startDate < CDate("1/1/2007")
startDate = DateAdd("d", 14, startDate)
cboPPStartDate.AddItem startDate
Loop
End Sub
I want to change the interface to allow user to change the Dates using two command buttons
named cmdNext and cmdPrevious.
I figured I would populate a text box value using
Code:
=cdate("5/20/2006")
But I ran into the issue that the cmdNext click event would not be able to change the date because that code was placed in
the Control Source. I then tried "select startdate from tblpayperiod" because I create a table called tblpayperiod and placed the startdate there but then when my for loaded I got #Name?
How can I create this interface? Is there a way to use the combo box but not have the drop down arrow appear? Any Ideas or thoughts? I am stalled on getting the startdate on the form
following code on the cmdNext click event
Code:
txtStartDate.Value = dateadd("d", 14, txtStartDate.Value)
[code]
and the following code on the cmdPrevious click event
[code]
txtStartDate.Value = dateadd("d", -14, txtStartDate.Value)
[code]
The issue I am having is the code to
Newbie in search of knowledge