Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Microsoft Access can't move the focus to the control txtIndex


Message #1 by "Santosh Gurung" <golbheda@y...> on Wed, 20 Mar 2002 03:03:22
hello,


I am getting this error when I try to move the focus to the textbox 
control in the form jst for one particular record in the application, 
others works fine. Both the visible and enabled property is set to ON. Is 
there a way I can force focus on this textbox control? or other ways? I 
will appreciate your help. Thanks.

eg. form!table!txtbox.SetFocus gives above err msg


Santosh
Message #2 by brian.skelton@b... on Wed, 20 Mar 2002 07:09:35
Santosh

You forgot to include the error message!

Brian
Message #3 by "Santosh Gurung" <golbheda@y...> on Wed, 20 Mar 2002 13:25:34
> Santosh

> You forgot to include the error message!

> Brian

the error message is

Microsoft Access can't move the focus to the control txtIndex
Message #4 by brian.skelton@b... on Wed, 20 Mar 2002 13:59:12
Are you certain that the control has not been disabled by code elsewhere 
in the application? Possibly triggered by some criteria in the record that 
is causing the problem?

When the error occurs, click on the debug button (or press <ctrl><break>) 
to open the code. Type ?me![txtIndex].enabled in the immediate window and 
press return to check what state the control is in.

Brian

> > Santosh

> > You forgot to include the error message!

> > Brian

> the error message is

> Microsoft Access can't move the focus to the control txtIndex
Message #5 by "Leo Scott" <leoscott@c...> on Wed, 20 Mar 2002 19:22:03 -0800
I had a similar problem today.  It turned out that some of my other code in
events was causing the problem.

Do you have any code in the LostFocus event for the control losing focus
when you are setting focus to the new control.  Comment it out and see if
the error disappears.  If so troubleshoot from there.

|-----Original Message-----
|From: Santosh Gurung [mailto:golbheda@y...]
|Sent: Wednesday, March 20, 2002 1:26 PM
|To: Access
|Subject: [access] Re: Microsoft Access can't move the focus to the
|control txtIndex
|
|
|> Santosh
|
|> You forgot to include the error message!
|
|> Brian
|
|the error message is
|
|Microsoft Access can't move the focus to the control txtIndex
|

Message #6 by "Santosh Gurung" <golbheda@y...> on Wed, 27 Mar 2002 13:40:26
I got it working, thanks for your help. 

Santosh

> I had a similar problem today.  It turned out that some of my other code 
in
events was causing the problem.

Do you have any code in the LostFocus event for the control losing focus
when you are setting focus to the new control.  Comment it out and see if
the error disappears.  If so troubleshoot from there.

|-----Original Message-----
|From: Santosh Gurung [mailto:golbheda@y...]
|Sent: Wednesday, March 20, 2002 1:26 PM
|To: Access
|Subject: [access] Re: Microsoft Access can't move the focus to the
|control txtIndex
|
|
|> Santosh
|
|> You forgot to include the error message!
|
|> Brian
|
|the error message is
|
|Microsoft Access can't move the focus to the control txtIndex
|


  Return to Index