![](/uploads/1/2/7/6/127683234/681056778.jpg)
Use Do while to loop through until EOF: Recordset Seek « Access « VBA / Excel / Access / Word.Use Do while to loop through until EOFPrivate Sub RunningSumDAODim db As DatabaseDim rs As RecordsetDim lRunningSum As LongDBEngine.SetOption dbMaxLocksPerFile, 1000000Set db = CurrentDblRunningSum = 0Set rs = db.OpenRecordset( 'SELECT. FROM Employees ORDER BY FirstName')Do While Not rs.EOFrs.Editrs!RunningSum = lRunningSumrs.UpdatelRunningSum = lRunningSum + rs!Durationrs.MoveNextLooprs.CloseEnd SubRelated examples in the same category 1.2. © Demo Source and Support. All rights reserved.
![Do while not eof access vba Do while not eof access vba](/uploads/1/2/7/6/127683234/162093242.jpg)
![Access Access](/uploads/1/2/7/6/127683234/735110593.jpeg)
Microsoft Access – Using XML Files: Reading and Writing. Do While Not EOF (FileNum) Line Input # FileNum, strLineInput. Hi, thank you for the code, but VBA give some errors: txtFullFile = “” – the variable is not declarete. Can you help me with the correct code?
![](/uploads/1/2/7/6/127683234/681056778.jpg)