Here is my dilemna. Form A contains subform X as well as a few unbound text fields. Form B has a number of buttons and unbound text fields. Form A is the primary form and spawns form B through an on-click event in subform X. I would prefer to disable subform X after form B is loaded for various reasons:
Forms!FormA!SubformX.Enabled = False
I placed this line in several events involved with the loading/initialization of Form B. In every case, I am told that I cannot disable a control when it has the focus. I have tried several fixes:
a.) Switching the focus to form B before disabling subform X.
b.) Switching the focus to various other controls on form A before disabling subform X.
c.) Waiting until after form B has loaded (for instance, on the enter event of one of its text boxes) before disabling subform X, so that form B should have the focus.
Does anyone know how to snatch the focus away from subform X so that I can alter its Enable field?
Forms!FormA!SubformX.Enabled = False
I placed this line in several events involved with the loading/initialization of Form B. In every case, I am told that I cannot disable a control when it has the focus. I have tried several fixes:
a.) Switching the focus to form B before disabling subform X.
b.) Switching the focus to various other controls on form A before disabling subform X.
c.) Waiting until after form B has loaded (for instance, on the enter event of one of its text boxes) before disabling subform X, so that form B should have the focus.
Does anyone know how to snatch the focus away from subform X so that I can alter its Enable field?