J
JP
Help!!!!
I have a form with a combo box and a subform.
The subform has a subform of its own as well.
The combo box on the main drives both subforms.
I want to disable both subforms while the combo box is
being used. So for the "gotFocus" event of the combo box
I have the following code:
subform1!subform2.Enabled = False
subform1.Enabled = False
This works if a control on subform1 previously had the
focus.
But if a control on subform2 previously had the focus, I
get an error message as soon as I click on the combo box.
The error message is:
Run-time error '2164':
You can't disable a control while it has the focus.
When I click 'Debug' it highlights
subform1!subform2.Enabled = False
in the combo box GotFocus event.
This is why I am confused.
Since I am in the combo box GotFocus event that means the
combo box has the focus. Therefore, I should be able to
disable the subforms.
Any ideas? Anyone? Anyone?
I have a form with a combo box and a subform.
The subform has a subform of its own as well.
The combo box on the main drives both subforms.
I want to disable both subforms while the combo box is
being used. So for the "gotFocus" event of the combo box
I have the following code:
subform1!subform2.Enabled = False
subform1.Enabled = False
This works if a control on subform1 previously had the
focus.
But if a control on subform2 previously had the focus, I
get an error message as soon as I click on the combo box.
The error message is:
Run-time error '2164':
You can't disable a control while it has the focus.
When I click 'Debug' it highlights
subform1!subform2.Enabled = False
in the combo box GotFocus event.
This is why I am confused.
Since I am in the combo box GotFocus event that means the
combo box has the focus. Therefore, I should be able to
disable the subforms.
Any ideas? Anyone? Anyone?