A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

error 2165



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 09:22 PM posted to microsoft.public.access
deb
external usenet poster
 
Posts: 898
Default 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  
Old April 20th, 2010, 09:36 PM posted to microsoft.public.access
Bill Mosca
external usenet poster
 
Posts: 65
Default 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  
Old April 20th, 2010, 09:46 PM posted to microsoft.public.access
deb
external usenet poster
 
Posts: 898
Default 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  
Old April 20th, 2010, 09:50 PM posted to microsoft.public.access
deb
external usenet poster
 
Posts: 898
Default 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  
Old April 20th, 2010, 10:09 PM posted to microsoft.public.access
Bill Mosca
external usenet poster
 
Posts: 65
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.