Text selection on cancelevent

GordonR

Registered User.
Local time
Today, 19:46
Joined
Aug 19, 2003
Messages
29
I am sure this must be very simple but....
as the 'Before Update' event for a text box in s asubform in datasheet view, I perform some validation and if it fails send a msgbox then 'cancelevent' (in a macro). Although the box still has the focus, I would like the erroneous value selected/highlighted to make it stand out for the user.
How can I do this? I have used conditional formatting to change the colour when gets the focus but it still doesnt stand out too well.
Thanks in anticipation!
 
Check out the SelLength, SelStart, SelText properties in the help files on how to do that.

HTH
 
Works a treat - thanks!!
 

Users who are viewing this thread

Back
Top Bottom