MS Access can not change focus to control button 
Author Message
 MS Access can not change focus to control button

Hi everyone,

I am new to Access and VB and am plugging along mostly with macros until I
feel more comfortible with VB. I have a problem moving the focus to a
button on a form I just opened with a macro. The error message I get is:

        MS Access can not move focus to control button

        * Control maybe can not receive focus like label
        * Control visible property set to no
        * Control enabled property set to no

None of these seem to be the problem. In fact if the user presses any key
or the mouse on the form after it is opened, then the macro will set the
focus on the button.

Does anyone know how I might automatically open a file and set the focus on
this button?

I tried using the Select Object to the form first and it did not help.

Thank you in advance.

Dennis Becker



Sat, 21 Aug 1999 03:00:00 GMT  
 MS Access can not change focus to control button

Try placing the marco in the OnActivate, rather than the OnOpen.
It is failing, because the OnOpen runs before the control is acutally
visible.

--
David W. Forest
LAN Specialist
Information Technologies
Lear Corporation - Ford Division
SBN Level 2
http://www.concentric.net/~dforest/

If you're not scared, you don't understand.



Quote:
> Hi everyone,

> I am new to Access and VB and am plugging along mostly with macros until
I
> feel more comfortible with VB. I have a problem moving the focus to a
> button on a form I just opened with a macro. The error message I get is:

>    MS Access can not move focus to control button

>    * Control maybe can not receive focus like label
>    * Control visible property set to no
>    * Control enabled property set to no

> None of these seem to be the problem. In fact if the user presses any key
> or the mouse on the form after it is opened, then the macro will set the
> focus on the button.

> Does anyone know how I might automatically open a file and set the focus
on
> this button?

> I tried using the Select Object to the form first and it did not help.

> Thank you in advance.

> Dennis Becker




Sun, 22 Aug 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Any ways to make focus on Label control like focus in button control

2. control focus ms access 97

3. control focus in ms access 97

4. control focus in ms access 97

5. MS Access DB changes not working

6. Command button won't make use of module driving MS Project from MS Access 2000

7. buttons not getting focus...

8. buttons not gaining focus....

9. BUG: MS Access - Calendar Control Not on Properties Sheet

10. CommandBarComboBox Change event (content not saved when losing focus)

11. Changing control name of button doesn't change event name to be the same

12. Cans access2.0 engine access btrieve files?

 

 
Powered by phpBB® Forum Software