Is there an easy way to check to see what control on a form has focus and lost focus?
Example:
I have a form with 10 textboxes.
in each textbox "GotFocus" event I have this code..
(keep in mind the "text." name changes in each event)
VB Code:
text.backcolor = vbred doevents
and in each textbox "LostFocus" event I have this code...
VB Code:
text.backcolor = vbwhite doevents
I would like to have 2 events like ControlGotFoucs and ControlLostFocus and use some type of case statment (or something else) to change the backcolor for the controls...
Is this possible or do I need to code each and every controls events?
Thanks for the info,
Rudy




Reply With Quote