Hi,
The code below is to check on a form whether the From Date is Less than the To Date.
For some Reason it is not coming up with the error
Code:
If Format(Me.txtFromDate, "dd/mm/YYYY") < Format(Me.txtToDate, "dd/mm/YYYY") Then
MsgBox "'Between Dated' must be more than Start Date!", vbExclamation
Exit Sub
Else
Im sure it has something to do with the fomatting of the date but I cant figure it out.
I tried the same code with a ">" instead and it worked although it shouldnt. but only if the dates where in the same year.
Strange......
Any Ideas?