property CalendarCombo.Value as Date
Retrieves or sets the browsed date. Ensures that the date is visible.

 TypeDescription 
   Date A date expression that indicates the selected date.  
The Value property ( default property of the control ) indicates the selected date. The Value property is identical with the SelDate property. The Date property specifies the date being browsed in the drop down portion of the control. Use the MaskOnEmpty property to specify the caption being displayed in the control's label when the SelDate property is empty. The SelectionChanged event is fired if the user changes the browsed date.

The following VB sample set the SelDate property on empty, when the user presses the Delete key: ( displays an empty date )

Private Sub CalendarCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
    If (KeyCode = vbKeyDelete) Then
        CalendarCombo1.SelDate = 0
    End If
End Sub 

or

Private Sub CalendarCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
    If (KeyCode = vbKeyDelete) Then
        CalendarCombo1.Value = 0
    End If
End Sub

or

Private Sub CalendarCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
    If (KeyCode = vbKeyDelete) Then
        CalendarCombo1 = 0
    End If
End Sub


Send comments on this topic.
© 1999-2006 Exontrol Inc, Software. All rights reserved.