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.
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.