Consulting

Results 1 to 6 of 6

Thread: Show progress on extraction of data from DB

  1. #1
    VBAX Regular
    Joined
    Dec 2011
    Posts
    58
    Location

    Show progress on extraction of data from DB

    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


  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,646
    I'd say improving the speed of the data extraction is more important than adding new coding that is slowing the data extraction process.

  3. #3
    VBAX Regular
    Joined
    Dec 2011
    Posts
    58
    Location
    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...

  4. #4
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,646
    Can't you speed that up ?

  5. #5
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    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.

  6. #6
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    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.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •