Hi Everyone,
I have two unbound text fields namely txtStartDate and txtEndDate on a form. I want to verify that txtEndDate is not less (earlier) than txtStartDate and when this condition is met, a message pops up notifying the user.
I have tried using the following code but am not getting the desired result.
txtEndDate.SetFocus
If txtEndDate.Text < txtStartDate then
Msg "Please rectify Date, End Date earlier than Start Date"
txtEndDate.SetFocus
exit sub
End If
Your help and support is much needed and welcome.
Thanks in advance
I have two unbound text fields namely txtStartDate and txtEndDate on a form. I want to verify that txtEndDate is not less (earlier) than txtStartDate and when this condition is met, a message pops up notifying the user.
I have tried using the following code but am not getting the desired result.
txtEndDate.SetFocus
If txtEndDate.Text < txtStartDate then
Msg "Please rectify Date, End Date earlier than Start Date"
txtEndDate.SetFocus
exit sub
End If
Your help and support is much needed and welcome.
Thanks in advance