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

updating a form while processing data

Status
Not open for further replies.

sparkyzx

Programmer
Joined
Jul 5, 2001
Messages
2
Location
GB
Hi,

Im trying to put a counter on the screen that counts records as they are processed by a recordset from the DB, but for some reason, VB waits until all the records have been processed until it updates the counter on the form.

Any ideas how to refresh the form after I process each record?

Thanks!
Matt
 
I assume you use a label for the counter.....
Just add DoEvents after you set the label's caption to [RecordCount]

Cheers
Toyman
 
There's also a thing called "me.Refresh". It's actually a method of a form. All it does is update the form while DoEvents processes ALL the events that come in while you're doing your database stuff. I'm actually working on exactly the same thing now (updating a counter on the form while processing a rather large recordset).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top