Link to home
Start Free TrialLog in
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
Avatar of reb73
reb73
Flag of Ireland image

Have you tried setting the tabindex property to 1?
Avatar of jaud
jaud

ASKER

What does that do?  What importance is the tabindex property?
ASKER CERTIFIED SOLUTION
Avatar of reb73
reb73
Flag of Ireland 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 jaud

ASKER

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.
Avatar of jaud

ASKER

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
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.
Avatar of jaud

ASKER

OK, how do you set focus on the section name?