Ok, I am probably blind (comes with age, I guess) but I can't figure out this error. When the following code is run I get the error msg "Next without For"
Is there a possibility the interveining code is bypassing the NEXT?
Any sharpeyed help will be appreciated.
Thanks
Code:
Set db = CurrentDb()
Set rs = db.OpenRecordset(sql, dbOpenSnapshot)
If rs.RecordCount > 0 Then
For i = 1 To 37
If IsDate(f("date" & i)) Then
With rs
.MoveFirst
Do While Not .EOF
If rs![Date Scheduled] = f("date" & i) Then
If Len(Trim(Nz(f("text" & i), ""))) > 0 Then
f("text" & i) = f("text" & i) & vbCrLf & _
rs![job#]
Else
f("text" & i) = rs![job#]
End If
End If
.MoveNext
Loop
Next i
End If
Any sharpeyed help will be appreciated.
Thanks