G
Guest
hi
I have a main form that has a combobox, and a subform with many textboxes.
Depending which selection I make from the combobox, its AfterUpdate event
code disables several of the subform's textboxes. What frequently happens
when I use the combobox is that I get error 2164: "You can't disable a
control while it has the focus". I take it the subform and the main form
each have their own focus. If I manually click in a textbox that I know
won't be disabled, then all is OK when I use the combobox. I 'd like the
AfterUpdate code to move the focus to a 'safe' place, (something like
Forms!frmMain!sfrmSub.Form.SetFocus) but I can't get the reference syntax
correct. Any clues?
I have a main form that has a combobox, and a subform with many textboxes.
Depending which selection I make from the combobox, its AfterUpdate event
code disables several of the subform's textboxes. What frequently happens
when I use the combobox is that I get error 2164: "You can't disable a
control while it has the focus". I take it the subform and the main form
each have their own focus. If I manually click in a textbox that I know
won't be disabled, then all is OK when I use the combobox. I 'd like the
AfterUpdate code to move the focus to a 'safe' place, (something like
Forms!frmMain!sfrmSub.Form.SetFocus) but I can't get the reference syntax
correct. Any clues?