error 2165

D

deb

access 2003

I have a form with a subform with a subform.
fWarranty, fWarrantyUnit, fWarrantyDetails

There is a option group called CT on fWarrantyUnit.
and another option group Called IT in fWarrantyDetails.

In the after update event on option group in fWarrantyUnit I have
Me.f019WarrantyDetails.Form.optHPorIPorLP.Visible = False

When the user clicks on subform3 option group and then clicks on subform2
option group I get the error... 2165 you can't hide a control that has the
focus.

Please help
 
B

Bill Mosca

Deb

You have to move the focus off of the control before you can hide it. I
usually just move it to some other control like a nearby text box or combo
box.
Me.f019WarrantyDetails.Form.MyTextbox.SetFocus
Me.f019WarrantyDetails.Form.optHPorIPorLP.Visible = False
 
D

deb

where do i enter this code.
i tried it above the .visible=false code and it errored.

I guess it is because it is focused on the subsubform and the use is
clicking an option group on the parent.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top