In my form I have an InvoiceDate and ReceivedDate text box. In the ReceivedDate_LostFocus event I have this code:
If ReceivedDate < InvoiceDate Then
MsgBox "Enter a Received Date that is later than the Invoice Date."
ReceivedDate.SetFocus
ReceivedDate.Text = ""
End If
The problem is that it doesnt keep the textbox focused. The msgbox comes out, it clears the textbox, but doesnt keep the focus on the textbox but jumps to the next one.
I dont think this should be an afterupdate event because if they dont change anything they could tab out the textbox.
Any and all suggestions are welcomed
HI-Priest
If ReceivedDate < InvoiceDate Then
MsgBox "Enter a Received Date that is later than the Invoice Date."
ReceivedDate.SetFocus
ReceivedDate.Text = ""
End If
The problem is that it doesnt keep the textbox focused. The msgbox comes out, it clears the textbox, but doesnt keep the focus on the textbox but jumps to the next one.
I dont think this should be an afterupdate event because if they dont change anything they could tab out the textbox.
Any and all suggestions are welcomed
HI-Priest