Runtime error '2110' - HELP!!

  • Thread starter Thread starter hawornk via AccessMonster.com
  • Start date Start date
H

hawornk via AccessMonster.com

I’m at a total loss! I have two sets of eight controls, one large and one
small, that are paired up. Either the large or small control of each pair
will be visible at any given time.

Here is a sample of the code I use to switch the focus and the visibility:

Private Sub Citations_3_DblClick(Cancel As Integer)
Me.citation4.Visible = True
Me.citation4.SetFocus
Me.Citations_3.Visible = False
End Sub

This code works PERFECTLY for seven out of the eight pairs, however, for one
particular pair, I continually get “Runtime error ‘2110’ cannot Move the
focus to the control citation6.â€

Here is the code for the problem control:

Private Sub citations_5_DblClick(Cancel As Integer)
Me.citation6.Visible = True
Me.citation6.SetFocus
Me.citations_5.Visible = False
End Sub

Why would the exact same code only work seven times out of eight??? I double-
checked the properties for the boxes and they’re all the same, too!
 
Is Me.Citation6.Enabled set to true?

I have encountered similar problems when using the .SetFocus method. I found
that DoCmd.GoToControl worked better for moving the focus (and the cursor) to
the control you need.
 
Yes enabled is set to "true." The settings for me.citation6 are exactly the
same as the settings for the other 7 controls that are identical to it;
that's what's so weird about the whole thing...

I've never used the docmd.gotocontrol feature before; what is the correct
syntax that I should use?

Rod said:
Is Me.Citation6.Enabled set to true?

I have encountered similar problems when using the .SetFocus method. I found
that DoCmd.GoToControl worked better for moving the focus (and the cursor) to
the control you need.
I’m at a total loss! I have two sets of eight controls, one large and one
small, that are paired up. Either the large or small control of each pair
[quoted text clipped - 22 lines]
Why would the exact same code only work seven times out of eight??? I double-
checked the properties for the boxes and they’re all the same, too!
 
Yes enabled is set to "true." The settings for me.citation6 are exactly the
same as the settings for the other 7 controls that are identical to it;
that's what's so weird about the whole thing...

I've never used the docmd.gotocontrol feature before; what is the correct
syntax that I should use?

Rod said:
Is Me.Citation6.Enabled set to true?

I have encountered similar problems when using the .SetFocus method. I found
that DoCmd.GoToControl worked better for moving the focus (and the cursor) to
the control you need.
I’m at a total loss! I have two sets of eight controls, one large and one
small, that are paired up. Either the large or small control of each pair
[quoted text clipped - 22 lines]
Why would the exact same code only work seven times out of eight??? I double-
checked the properties for the boxes and they’re all the same, too!
 
YAY!

I found it! It was a bit of errant code elsewhere on the form that referred
to me.citation6 that was screwing things up.

It's working now :-)
Yes enabled is set to "true." The settings for me.citation6 are exactly the
same as the settings for the other 7 controls that are identical to it;
that's what's so weird about the whole thing...

I've never used the docmd.gotocontrol feature before; what is the correct
syntax that I should use?
Is Me.Citation6.Enabled set to true?
[quoted text clipped - 7 lines]
 
Back
Top