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

Progress bar

Status
Not open for further replies.

Sam8932

Programmer
Oct 15, 2002
22
0
0
How can I make a progress bar to keep track of data being updated to a database? Can I put it on the form or would it be better to use a splash screen in some way? Any help on this would be greatly appreciated.

Thank you,
Sam
 
I put a progress bar near my staus bar on the bottom of my form. It all depends on how you save your data. Example, if you update 6 tables, increase your progress bar 1 value for each table and set the max value to 6.

Rob
 
You can put it on either. It really depends on how you have the UI designed. The only thing about loading an additional splash screen is VB(at least in my experience) sometimes has trouble painting multiple forms when there is intense processing going on. There are ways around it but it often depends on the users machine. If you will make the database connection from the UI, then you could just increment the progress bar value each time you loop a record.
 
Thanks guys. I probably should have put this in my first post. To alleviate the potential for locking errors that occur from adding records and updating after each record is written, I pass an array by reference to a sub that adds each element using the .UpdateBatch method. How could I incorporate a progress bar with this? I've never used progress bars, so I'm not at all familiar with them.

Thanks,
Sam
 
Try this out

ProgressBar.Min = 0
ProgressBar.Value = 0
ProgressBar.Max Ubound(Array)

For x = 0 to Ubound(Array)
'do you update with your array here
ProgressBar.Value = x
Next x

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top