Mark,
If Me.txtEndDate < Me.txtStartDate
Msgbox "End Date cannot be earlier than Start Date"
Me.txtEndDate = null
Me.txtEndDate.SetFocus
End If
I have added a message box to alert the user as to what they are doing
wrong, and why their entry disappeared.
Regularly, a user would first enter start date, then end date (you can also
guide them that way by means of relative position and tab order). So, I
guess you could use the on change event of the end date textbox.
HTH,
Nikos
"Mark" <mm*****@earthlink.net> wrote in message
news:Ry******************@newsread3.news.atl.earth link.net...
What is the code to do the following --
If txtEndDate < txtStartDate
txtEndDate = null
txtEndDate setfocus
End If
Also, what event should the code be in?
Thanks!
Mark