I have a table with 120 fields. I am running this small function just to print out the name of each field.
When it gets to the 57 one it stops and give me an error "run time error 3021" no current record"
when I restart the function at 58 it goes to record 114.
Its only doing 57 records at a time.
Can anyone let me know if they see anything wrong with this
thanks
When it gets to the 57 one it stops and give me an error "run time error 3021" no current record"
when I restart the function at 58 it goes to record 114.
Its only doing 57 records at a time.
Can anyone let me know if they see anything wrong with this
thanks
Code:
Function check_results()
Dim rst As Recordset
Dim db As Database
Set db = CurrentDb
Dim x As Double
Set rst = db.OpenRecordset("select * from tblresults")
rst.MoveLast
rst.MoveFirst
x = 0
MsgBox rst.Fields.Count
Do While x < rst.Fields.Count
Debug.Print rst.Fields(x).Name
x = x + 1
rst.MoveNext
Loop
End Function