Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3021 error when working with a recordset

Status
Not open for further replies.

Kumal

IS-IT--Management
Feb 8, 2007
3
US
I'm getting a "3021 - Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. ADODB.Field" error when I try to move to the next record.

Any ideas?

If Not MRKTPromo.BOF And Not MRKTPromo.EOF Then

Do While Not MRKTPromo.EOF


sqlstr = "insert into PromoStatus (PlayerID, PromoName) values ('" & PlayerID & ""
sqlstr = sqlstr + "', " & MRKTPromo!PromoName & ")"

Debug.Print sqlstr
'DoCmd.SetWarnings False
'DoCmd.RunSQL sqlstr
'DoCmd.SetWarnings True


Debug.Print MRKTPromo.EOF
MRKTPromo.MoveNext
Loop
End If
End Sub
 
I May be way off base here, but i don't understand how you can create a recordset inside a loop that references that recordset.


Everybody is somebodys Nutter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top