I am using the following to Select the textbox when the date is before another date. I thought it wasn't working. However when I stepped through the code it does select the text until the End Sub and then becomes unselected. I have this in the after update event. Is this the right spot? Or should I use another technique to highlight the textbox for user to decide whether to adjust the date.
DateSelected is how it looks prior to End Sub and DateNotSelected is how it looks when the code has finished.


Code:
If Me.tb_DateTaken < dtRWP Then
MsgBox "Training Date of " & Me.tb_DateTaken & " is before the RWP date of " & dtRWP & ". Please verify this is correct or enter a date after the RWP date.", vbOKOnly + vbQuestion, "Date Issue"
Me.tb_DateTaken.SetFocus
Me.tb_DateTaken.SelStart = 0
Me.tb_DateTaken.SelLength = Len(Me.tb_DateTaken)
End If
End Sub
DateSelected is how it looks prior to End Sub and DateNotSelected is how it looks when the code has finished.

