
May 20th, 2002, 07:28 AM
|
|
Contributing User
|
|
Join Date: Mar 2001
Location: North Yorkshire (U.K.)
Posts: 64
Time spent in forums: 5 h 24 m 18 sec
Reputation Power: 8
|
|
find components & step value
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!!
ANY IDEAS???
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
End If
Next j
End Sub
|