Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date validation for DtPicker

Status
Not open for further replies.

Devaki

Programmer
May 23, 2001
58
US
Hi ,
How to do a date validation for DTPicker?
I have a startdate and enddate? The startdate should not be greater than the end date
How do i do this?

Thanks for any help
Devaki
 
Try this ...

Private Sub DTPicker1_CloseUp()
Dim varDate As Variant
varDate = DTPicker1.Value
If varDate <= varEndDate And varDate >= varBeginDate Then
' do nothing cuz it's ok
Else
' do something cuz it's not ok
End If
End Sub

Jim Null
Solutions by Jim Null
web:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top