Results 1 to 7 of 7
  1. #1
    nwood is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2017
    Posts
    7

    VBA for Progress/Load bar on my Form

    Hello,

    So I have a button that runs Acces VBA to run Excel macros and Access Queries. I have gotten the button to work, but now I am trying to figure out a way to add a progress bar to my form that shows progress to the end user.

    I have looked online and haven't been able to figure out how to do it myself. I am relatively new to Access so I would appreciate any help!

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    ProgBar.value = N / Total
    doEvents

    be sure to add the doEvents so the form will update.

  3. #3
    nwood is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2017
    Posts
    7
    Quote Originally Posted by ranman256 View Post
    ProgBar.value = N / Total
    doEvents

    be sure to add the doEvents so the form will update.
    So where would I put this code? I have seen online people make rectangles and text boxes to do it, so would it be something like that? Would I put this code between all my each action in my code. I am confused

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664

  5. #5
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    In the button click, or macro.
    what are you watching the progress of?

  6. #6
    nwood is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2017
    Posts
    7
    Quote Originally Posted by ranman256 View Post
    In the button click, or macro.
    what are you watching the progress of?

    I am watching the progress of VBA code being executed in Access. I'd like the progress bar to be based on time, not on completion of certain events.

  7. #7
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Interesting, but not very feasible, IMO. The length of time code takes to execute depends on the CPU speed, FSB speed, amount of RAM, amount of data (more data = slower), network speed (if BE is on a network), possibly hard drive RPM (5400 vs 7200 rpm, SATA vs SSD),......


    If you knew the number of lines of code to be executed, you could update the progress bar after x number of lines, but it wouldn't be time based.......

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Adding Progress Bar in a form
    By KH Ahmed Bara in forum Programming
    Replies: 4
    Last Post: 04-09-2016, 04:43 AM
  2. Replies: 1
    Last Post: 06-13-2012, 07:39 PM
  3. Form Progress/Status Bar
    By Tomfernandez1 in forum Forms
    Replies: 2
    Last Post: 06-09-2011, 01:01 PM
  4. Progress/Status Bar on Form
    By Tomfernandez1 in forum Forms
    Replies: 5
    Last Post: 05-10-2011, 04:41 PM
  5. Replies: 9
    Last Post: 09-19-2010, 09:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums