Hello
I work with a DateTimePicker control and I want to control the date choosen by the user.
The date must be today or later...
Thank U for your help
Printable View
Hello
I work with a DateTimePicker control and I want to control the date choosen by the user.
The date must be today or later...
Thank U for your help
Not with VB right now, but do an OnUpdate or OnChange or a Timer to check that the date of the control is >= Date()
Why not trap one of the events that the dtp produces. Like:
WokaVB Code:
Private Sub dptMyDate_Change() If dtpMyDate.Value < Date Then MsgBox "NO BAD USER!" dtpMyDate.Value = Date End If End Sub
Set the MinDate property equal to today. The user will not be able to select or enter anything before then.
VB Code:
Private Sub Form_Load() Me.DTPicker1.MinDate = Date End Sub