D
dsc2bjn
I have a calendar control which i have tied to another control. I have set
the calendar to appear when you "mouse down" on the control. I am trying to
get the calendar to default to today's date, if there is a value for the date
control. Right now the date defaults to the date the calendar control was
added to the screen.
What did I do wrong?
Private Sub Original_Date_Calendar_Click()
' Set Date to the selected date and hide the calendar.
Original_Date.Value = Original_Date_Calendar.Value
Original_Date.SetFocus
Original_Date_Calendar.Visible = False
End Sub
Private Sub Original_Date_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
' Show Calendar and set its date.
Original_Date_Calendar.Visible = True
Original_Date_Calendar.SetFocus
' Set to today if OrderDate has no value.
Original_Date.Value = IIf(IsNull(Original_Date), Date, Original_Date.Value)
End Sub
the calendar to appear when you "mouse down" on the control. I am trying to
get the calendar to default to today's date, if there is a value for the date
control. Right now the date defaults to the date the calendar control was
added to the screen.
What did I do wrong?
Private Sub Original_Date_Calendar_Click()
' Set Date to the selected date and hide the calendar.
Original_Date.Value = Original_Date_Calendar.Value
Original_Date.SetFocus
Original_Date_Calendar.Visible = False
End Sub
Private Sub Original_Date_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
' Show Calendar and set its date.
Original_Date_Calendar.Visible = True
Original_Date_Calendar.SetFocus
' Set to today if OrderDate has no value.
Original_Date.Value = IIf(IsNull(Original_Date), Date, Original_Date.Value)
End Sub