Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139

    Unanswered: Status Bar - user added

    Hello;

    Does anyone know where I can get a progress bar addition for Access? I have a few reports that take 30 or more seconds to display and the query status bar only appears briefly during the process. I would like to add a progress bar graphic to run while the report is compiling to let users know the report is still processing. I saw one by JetSofts - Solution Informatique but had no instructions on how to get it working.

    Thanks...

    Larry

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Go to Insert->ActiveX Controls and look for Microsoft ProgressBar. Depending on your version of Access, there may be more than one.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Hi

    I may be out of order (as I cannot look at the previous link - down loads are blocked on our system !), but there is a built in progress bare with the SysCmd method.

    Just type SysCmd in the Help box in a code module, it is explained there.

    I haven’t actually used it so I am not sure if it is simple to use, I normally updated the text in the status bar with Pct complete or similar - up to now...


    HTH


    MTB

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    not too clear what you mean by 'get it working'.

    progress bars cannot guess where they are going or where they have got to so far: your code has to explicitly tell the progress bar what is happening.

    its easy if your process neatly interrupts itself from time to time, and it knows how much progress it has made, and it is willing to tell the progress bar. copying 100 files with a loop is a nice easy case in which to use a progress bar - every tenth loop you update the progress bar.

    from your initial question, it seems that you are waiting for a report to format itself... at first glance, that doesn't meet any of the three criteria in the previous para.

    you say query progress appears 'briefly' - the inference is that the bulk of the delay is report formatting. 30 secs does seem relatively long if the query itself is simple enough to complete 'briefly'. is there something special about this report that we should know about? many pages? many grafix? interesting code in the report module?

    speculatively, with not the first glass of red in my hand, is it possible to setup a report's data source to trip an error from time to time as the report formats? trap error/update progress/bypass error data/resume.

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Regarding the progres bar. My experience with the progress bar has been that it works great when you open a recordset and loop through the recordset (the code for the progress bar code that I've found - I haven't found any that actually times the loading of a form/report). This is because all the progress bar code I've found takes a counter (variable) and divides it by the count of the total records in the recordset, using a formula to increase the bar itself. If you're going to use it to show the time it takes to open a report or query, I haven't found a progress bar that works very well for this. For this, the only thing I've found is using a timer on the form or report which refreshes the timer and increases the progress bar but again, it didn't seem to work very well (unless you find some code that uses an API call somehow).

    So if you open a recordset and loop through the records, I think the progress bar will work very well for you. If you're basing it on the time it takes to open a form or report or query, you may have to somehow use the On_timer event of the form or report and I'm not sure that this works very well (but I may be wrong - MTB may have something with the SysCmd method which I've never tried).

    I can post the code for the progress bar when looping through the recordset if that's what you're looking for.
    Last edited by pkstormy; 11-23-06 at 23:04.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    139
    Hello Everyone'

    Sorry for the late response. The report calls a query of course, then formats the data returned by the query. Depending on server conditions this can take 30-seconds or so for the report to show up (display). Currently I use a simple "Please wait" screen launched by the report button on the reports menu. The PW screen is closed with the on-activate property of the report. Works kinda ok but would like to animate the screen somehow to show that the system has not locked up. Progress bar came to mind. However given that the query/report is not counting records, I guess the progress bar can only be marginally functional or accurate. Any thoughts on animating the Please wait... perhaps add a dot every 5 seconds or so?

    Thanks
    Larry

  7. #7
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    You could use a form that uses the Timer event. Every second add another ' . ' to a textbox. Then check the length of the data in the textbox. If it gets to 20 (or what ever works) reset it to ' . '.

Posting Permissions

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