You Can't hide the control that has focus

IanHem

Registered User.
Local time
Today, 04:53
Joined
Jul 8, 2014
Messages
106
I'm again in need of the advice of a more savvy person than myself.

I have a toggle control on a form which depending on selection uses a loop and instr to make 'not visible' a set of controls on a subform.(forms!Mainform!subform.form)

I get error 2165 but if I test immediatley before the make not visible process it returns the toggle frame as being the active control.

A kick in the right direction would be a great help
 
as you said - you can't hide a control that has the focus.
move the focus to another control before hiding.
 
Sorry I guess I'm not being clear, I'm not trying to hide the control that has focus, I'm trying to hide some controls on a subform.

Yet I get the error that I can't hide a control that has focus.
 
I've resolved this by setting the focus to a control on the subform, but I'm not sure why it happened in the first place.
 

Users who are viewing this thread

Back
Top Bottom