PDA

View Full Version : Show progress on extraction of data from DB



lionne
06-10-2013, 02:56 AM
Dear all,

recently I have faced the following problem: upon the connection to the DB, I wanted to show the data extraction progress to user. I have used progress bar for it. However, I also want to add more specific feedback, say, I'd like user to know, what exactly happends at what stage.

To solve it, I have tried to use labels. The idea is to show the label on the form on the fly, this doesn't work though.. I tried to:
1. create the labels on the form and make them visible during the extraction
2. add labels on the fly

Neither of these works as desired: the labels become visible only when the data extraction from DB is over.

Does anybody have a hint? I'd be very grateful.
Lionne

http://i39.tinypic.com/jb7ihy.png

snb
06-10-2013, 04:10 AM
I'd say improving the speed of the data extraction is more important than adding new coding that is slowing the data extraction process.

lionne
06-10-2013, 04:13 AM
Hi snb,

thanks for the reply. THe data extraction doesn't take much time (< 1 min), so I thought during this time it'd be nice to show the user, what is going on...

snb
06-10-2013, 04:48 AM
Can't you speed that up ?

Kenneth Hobs
06-10-2013, 05:43 AM
As snb said, if you can speedup the extraction that would be good. Without seeing your code, I can only suggest speedup tricks as shown in: http://vbaexpress.com/kb/getarticle.php?kb_id=1035

If you need to show progress, try Application.StatusBar.

p45cal
06-10-2013, 08:41 AM
Hints?
You probably have to make the form modeless (either the showmodal property set to False or call up the userform with the likes of:
userform1.show 0
but be aware that the code calling the userform to show will not wait at that code line until the userform has been closed/unloaded; the code will keep running on.