Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2010
    Location
    Denver, CO
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Progress Bar (Access 2002)

    I'm looking to include a progress bar in one of my applications. Having never used one before, they seem to be a little daunting. I have a couple of examples, but really at a loss as how to implement them. Does anyone have a recommendation on how to implement a pop-up form process bar. (The progress bar in the status bar is not noticeable enough or useful in my situation.)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Progress Bar (Access 2002)

    Microsoft has an example of creating a progress bar using native Access controls, with very detailed instructions: HOW TO: Simulate a Progress Bar in a Form Without Using an ActiveX Control in Access 2002. There is an example database using a similar idea attached to <post#=209085>post 209085</post#>.

    <post#=234022>post 234022</post#> contains example code for the ActiveX progress bar control.

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Progress Bar (Access 2002)

    If you're comfortable with VBA,here are a couple possibilities:

    I've only used progress bars (in their own pop-up form) when I'm running looping VBA code (For...Next, Do While...Loop, etc.) -- where the progress bar can be updated during each pass through the loop. If this fits your need, there are several approaches -- (1) there's an ActiveX control "Microsoft ProgressBar Control" (in the Microsoft Windows Common Controls library -- from the VBA editor, select Tools...References and check this library in the list; then you can find it in the list after selecting Insert...ActiveX Control when in Form design view). This control has a Min and Max property to define the range of the progress bar (e.g. 0 to 100 for a percent complete). Then, in your loop you just set the control itself to the desired value within the range (e.g., the desired percentage). (2) You can add two rectangles to your form to "build your own" progress bar. Both rectangles should have the same Top, Left, and Height properties. Use fill colors to give the appearance you want. Then in your loop, recalculate the Width property of one of the rectangles (the "moving bar") as a percentage of the width of the other rectangle (the fixed "full range" outline) based on how many times you've been through the loop relative to the total. Make sure the "moving bar" rectangle is in front of the full range outline rectangle (unless the latter is set to transparent).

    I hope this is enough to get you started -- it's a little sketchy. If not, holler and I (or someone else here) will help fill in the gaps.

    I don't know of a way to display a progress bar during a long query or other activity that you can't "interrupt" (to update the progress bar control) during it's execution.

Posting Permissions

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