Hi all,

1) Can I set a now date for DTPicker value on the properties colunm?
If no, cani have put DTpicker.value = now under the form_load event?

2) What is the best approach to valid if the date1 cannot be less than date2.
Is the below coding good enough or there is a better way.

VB Code:
  1. If DTpicker1 > DTpicker2 Then
  2. MsgBox" You have enter an invalid date" & vbCrLf & "Please try again" , vbinformation, "Invalid Date"
  3. Cancel = true
  4. Exit sub
  5. End if
  6.  
  7. If DTpicker2 > DTpicker3 Then
  8. MsgBox" You have enter an invalid date" & vbCrLf & "Please try again" , vbinformation, "Invalid Date"
  9. Cancel = true
  10. Exit sub
  11. End if