Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Index Property

Status
Not open for further replies.

markphsd

Programmer
Jun 24, 2002
758
US
I've been trying to figure this out for a while.

I have to set the tab index of about 60 or 70 controls on a form.

I have a sub that runs when the form loads, i've also tried it after the form is open:

It goes like this:

option explicit
private mlTabInit as integer

Private Sub InitTabIndex()

On Error GoTo eh:

mlTabInit = 0
FullName.TabIndex = 0
CompanyName.TabIndex = GetNextTab
Title.TabIndex = GetNextTab
Phone.TabIndex = GetNextTab
Fax.TabIndex = GetNextTab
CellPhone.TabIndex = GetNextTab
BusinessPhone.TabIndex = GetNextTab

etc....
exit sub

eh:

end sub

Private function GetNextTab() as integer
mlTabInit = mlTabInit + 1
GetNextTab = mlTabInit
end function

But it doesn't work. Stepping through each update of the tab index property on a control shows me that the actual index is not set.

Any ideas?

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
markphsd,

sorry if my last post was confusing. I had your problem confused with another post where the individual was using a for next loop to reindex controls.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top