I have three columns on my form consist of labels and check boxes. I did a debug to print controls by name. by the order controls output in debug window I determined each control's position(index #).
How do I assign a value to a control(label) using its index # of the control?
I tried Me.controls(5) = 5 on Windows 2000 and it works. But doesn't work on XP.

Thanks!

Dim i As Integer
For i = 0 To Controls.Count - 1
Debug.Print Controls(i).Name
If i = 5 Then
Controls(i).Value = 5
End If
'Debug.Print Controls(i).
Next i