Enabled Property

  • Thread starter Thread starter GR
  • Start date Start date
G

GR

I have a form that has three controls on it in order to
open three different forms based on the particular part of
the data input process the operator is in. When control 1
is selected I have no problem disabling control 2, 3 while
the new form opens in the lower part of the screen. (this
is done in order to be able to see the original data while
making entries to another table). When I exit from the
new screen I can enable control 2 (and 3 if I want) but
CANNOT disable control 1. It still has focus. I need to
be able to disable control 1 when form 2 closes and all I
have on the screen is the original form so that control 1
is no longer an option. I can't figure out a way to
disable this control at this point. Can someone help me?
 
Before you attempt to disable Control1 you should transfer
the focus to a different control

Me!ControlA.SetFocus
Me!Control1.Enabled = False

If Control1 is the only enabled control on the form you
can always add a 'transparent' command button to your form
and transfer focus to that instead. 'Transparent' is a
property of a command button that allows you to make it
invisible, but still allow it to get the focus. Be sure
to set the 'TabStop' property to 'No' to take it out of
the tab order and avoid confusing your users. good luck.
 
Back
Top