Issues with the click event

  • Thread starter Thread starter Jess
  • Start date Start date
J

Jess

Hi!

I have a subform in a form. Both the subform and the form have multiple
textboxes and comboboxes with white backcolor –original backcolor.

I would like to make data entry easier by setting to blue the backcolor for
the control clicked by the user. When the user clicks on another control, the
original backcolor for the previously clicked control –white- is restored. In
other words, the blue backcolor “follows around†the clicked control.

I have encountered a major issue implementing the above. If a user clicks on
the record number for the navigation bar after having clicked on a control,
the control does not lost the focus –this event is not triggered. There does
not seem to be an event the traps a click in the record number for the
navigation bar. I have to wait for the user to click on another control in
the same form to restore the color –white- of the previuosly clicked control
-my code keeps track of the last clicked control. The same thing happens if
the user clicks on another application after having clicked on a control. The
control does not lose the focus.

How can I know if my users are clicking on another application or on the
record number for the navigation bar? Or how can I get the blue backcolor to
follow around the clicked control accounting the aforementioned issue?

Thanks for your help.
 
Jess said:
I have a subform in a form. Both the subform and the form have multiple
textboxes and comboboxes with white backcolor –original backcolor.

I would like to make data entry easier by setting to blue the backcolor for
the control clicked by the user. When the user clicks on another control, the
original backcolor for the previously clicked control –white- is restored. In
other words, the blue backcolor “follows around” the clicked control.

I have encountered a major issue implementing the above. If a user clicks on
the record number for the navigation bar after having clicked on a control,
the control does not lost the focus –this event is not triggered. There does
not seem to be an event the traps a click in the record number for the
navigation bar. I have to wait for the user to click on another control in
the same form to restore the color –white- of the previuosly clicked control
-my code keeps track of the last clicked control. The same thing happens if
the user clicks on another application after having clicked on a control. The
control does not lose the focus.

How can I know if my users are clicking on another application or on the
record number for the navigation bar? Or how can I get the blue backcolor to
follow around the clicked control accounting the aforementioned issue?


Since A2K, you can use Conditional Formatting (Format menu)
to highlight a form's control with the focus. If that
doesn't do what you want, then I think that's just the way
things work. The focus can move around in windows outside
you form (including the nav box, scroll bars, etc) without
affecting the active control in any open form.
 
Maybe you can try using the OnExit event of the control to set the color back
to white? I don't know if this triggers on a change of applications, but it
should trigger anywhere else inside access

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
Back
Top