The procedure below is supposed to loop through the labels on a form intil it gets to a specific one (in this case a label named txt11000). I'm using Access97 but every time I try to run this, it gives a non specific error.
Also, the step value on the for statement gives an error, however, if I set it to -50, then it doesn't give an error!!
Private Sub settextboxes( i As Integer)
Dim j As Integer
For j = 700 To 2000 step 50
Set Label = CommandBars.FindControl(msocontrolLabel, "txt" + i + j, , True)
If j = 1000 Then
'Set backcolor of the label named txt11000