G
Guest
I have built an ADP which includes a form that contains bound & unbound
controls, some of which are updated by event routines.
When I switch the form from Design View to Form View, I get:
"Run-time error '2110': ... can't move the focus to the control txtRanks."
If I then click <Debug> I find that execution is halted at the line
txtRanks.SetFocus
and that this line executes with no problem using F5 or F8. The form is then
OK until the next time I switch to Design View and back again.
If I take out the offending line, I instead get the error
"Run-time error '21850': You can't reference a property or method for a
control unless the control has the focus."
Sounds like the warden in Cool Hand Luke ("Why's this hole here? / Why is
this hole filled up?").
How do I get past this?
controls, some of which are updated by event routines.
When I switch the form from Design View to Form View, I get:
"Run-time error '2110': ... can't move the focus to the control txtRanks."
If I then click <Debug> I find that execution is halted at the line
txtRanks.SetFocus
and that this line executes with no problem using F5 or F8. The form is then
OK until the next time I switch to Design View and back again.
If I take out the offending line, I instead get the error
"Run-time error '21850': You can't reference a property or method for a
control unless the control has the focus."
Sounds like the warden in Cool Hand Luke ("Why's this hole here? / Why is
this hole filled up?").
How do I get past this?