Link to home
Start Free TrialLog in
Avatar of LJG
LJG

asked on

Form --> design tools choose object -- do it in vba while the form is in design mode

Access 2010

Is there a way IN VBA to set focus to a control while the form is in DESIGN MODE?

If a from is in design mode, and you use the ribbon --> "Form Design Tools" /Format   there is an object pull down list that you can find your control and Access will put you on that control (while the form is in design mode) when you pick the control from the list.

Thanks in advance for your help
LJG

------------- The below is not important - but I know you are going to ask why ------------------
I have a tab control with about 25 pages on the control.
                    Tab Fixed Width =0
                    Tab Fixed Height =0
                    Style None
I get to the tabs from buttons on the form

I am redoing most of the pages, where I am moving controls etc to different pages of the controls.
It would be much easier if in code (while the form is in design mode) I could do something like --->   Forms!Tab_1.SetFocus.
Where the tab control name is ---> Tab_Ctl_1    and the pages are --->  Tab_1 /  Tab_2    etc.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LJG
LJG

ASKER

Thanks Scott

I'll take your advice.  I did add the Object combo to the Quick Access Toolbar.

LJG