I guys I need your help again on DoEvents. As You all know, doevents will repaint the windows so users wil not be annoy when we have a long loop.
Here's the situation: I load records from access and write it to a text file for exmaple:
VB Code:
  1. Public Sub LoadName()
  2. Dim rc As Recordset, sql As String
  3. sql = "SELECT * FROM name"
  4. Set rc = cn.Execute(sql)
  5. Do While Not rc.EOF
  6.     Writetext(rc("fistname"))
  7.     DoEvents
  8.     rc.MoveNext
  9. Loop

PS: i have like 30 000 records.

As you see, the doevents will repaint the window on every record. I read the forum someone post an alternative way for a doevent for like 10 times by

VB Code:
  1. For i = 0 To 900
  2. i mod 10 = 0 then DoEvents
  3. Next

But that only for a for ..next loop. Anybody know a way for the do ..while loop