
Signature
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
Alex,
I mean the index given to each control on a form, for example:
Me.Controls(5)
where the index 5 might be the index value of a text box "txtInput".
From the index, I can find the name of a control (Me.Controls(0).Name) but
how do I do it the other way round?
Many thanks
> Hmm, what index you mean? tab index or something else?
>
[quoted text clipped - 3 lines]
> >
> > Pete
David C. Holley - 28 Jun 2005 17:33 GMT
Try Me.Controls("controlName").index
> Alex,
> I mean the index given to each control on a form, for example:
[quoted text clipped - 15 lines]
>>>
>>>Pete
Bas Cost Budde - 28 Jun 2005 19:54 GMT
Interesting! Why?
The plain search technique comes to mind (air code):
function getControlIndex(cName as string)as long
dim i as long
for i=0 to controls.count
if controls(i).name=cname then
getcontrolindex=i
exit for
endif
next
end function
> Alex,
> I mean the index given to each control on a form, for example:
[quoted text clipped - 15 lines]
>>>
>>>Pete

Signature
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html