What's the best way to check if one date is greater than another? I have two textboxes with dates in them, want to make sure one of the dates is not greater than the other. The below works sometimes, but I just ran into a case where it isn't working.
VB Code:
If txtBidDate.text <> "" Then If txtReviewDate.text > txtBidDate.text Then MsgBox "The review date cannot be past the bid date", vbCritical, "Error" txtReviewDate.text = "" cmdReviewDate.SetFocus Exit Sub End If End If
reviewdate = 6/10/04
biddate = 6/9/04
Is it because I need to format them both to = mm/dd/yyyy so 6/9/04 would become 6/09/04, or is there a better way?
Thanks in advance




Reply With Quote