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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Infinate Loop.. not sure why

Status
Not open for further replies.

cranebill

IS-IT--Management
Jan 4, 2002
1,113
US
I ran this just to test and it loops infinately.

Rs.MoveFirst
Do Until Rs.EOF

MsgBox Rs!CompanyName


Loop

The recordset only has 1 record.... I am not sure why its looping infinately. Any Ideas?

Bill
 
Try this

Rs.MoveFirst
Do Until Rs.EOF

MsgBox Rs!CompanyName

rs.MoveNext
Loop
 
Nevermind lol... forgot to put in the rs.movenext lol

Man i need a vaca lol

Bill
 
Hi cranebill

It loops indefinitely because it never moves off of the first record in the table.

You need an
Code:
Rs.MoveNext
after the
Code:
MsgBox
command.

Regards

Mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top