If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
error 2165
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 -- deb |
#2
|
|||
|
|||
error 2165
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 -- Bill Mosca, Microsoft Access MVP http://www.thatlldoit.com "deb" wrote: 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 -- deb |
#3
|
|||
|
|||
error 2165
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. -- deb "Bill Mosca" wrote: 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 -- Bill Mosca, Microsoft Access MVP http://www.thatlldoit.com "deb" wrote: 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 -- deb |
#4
|
|||
|
|||
error 2165
Tried your code and it worked. My bad, I put the.form in the wrong place. Thank you!!! -- deb "Bill Mosca" wrote: 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 -- Bill Mosca, Microsoft Access MVP http://www.thatlldoit.com "deb" wrote: 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 -- deb |
#5
|
|||
|
|||
error 2165
You're welcome, Deb.
-- Bill Mosca, Microsoft Access MVP http://www.thatlldoit.com "deb" wrote: Tried your code and it worked. My bad, I put the.form in the wrong place. Thank you!!! -- deb "Bill Mosca" wrote: 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 -- Bill Mosca, Microsoft Access MVP http://www.thatlldoit.com "deb" wrote: 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 -- deb |
Thread Tools | |
Display Modes | |
|
|