Avatar of jaud
jaud asked on

MS Access tab order first in the header

Hello,
I need some help getting the tab order of my access forms to work the way that is needed.

I have a search form (newsearchfom) which has unbound text boxes in the header.  
When the form is loaded I need the tab order to start on the last name box (last1name)in the header (see picture)  I put  LAST1NAME.SETFOCUS in the on event field on the form, but it takes 2 pushes of the tab button for the curser to arrive at the field.  The curser doesn't not seem to be any place else before or after pushing the tab button or after pushing the tab button once.

I tried adding an unbound text box in the detail section , making in invisable and setting the tab order to start with it, and then setting the on click event to LAST1NAME.SETFOCUS but that did not work.  I tried setting the on load and on open events of the form to LAST1NAME.SETFOCUS but they did not work either (they either did not work at all or were no faster than two tab pushes)
Is there a way to set the focus to the last name field in the header when the form is loaded to be able to enter text immediately?

Thanks.
record-search.JPG
Microsoft Access

Avatar of undefined
Last Comment
jaud

8/22/2022 - Mon
reb73

Have you tried setting the tabindex property to 1?
ASKER
jaud

What does that do?  What importance is the tabindex property?
ASKER CERTIFIED SOLUTION
reb73

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
jaud

I set the tab index to 1 and 2 but when the form opens the focus goes to the first field on the details section.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER
jaud

OK, I figured it out, I just need to put me. infront of the last1name.setfocus.
so me.last1name.setfocus goes straight to the control.
Thanks
dqmq

Before setting focus on the control name, set focus on the section name.  Or just change focus to the header section name and it will default to the first tab index FOR THAT SECTION.
ASKER
jaud

OK, how do you set focus on the section name?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.