Results 1 to 5 of 5

Progress bar on start up

  1. #1
    craig1988 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2014
    Posts
    82

    Progress bar on start up

    Hi

    I have a pretty large DB that I know want to add functinality to.

    So I have an AutoExec Macro that on open; Performs a back up (Creates a daily copy of the Back-End), Archives records that are 3 years old (based on the date they were logged moves to another file) and Discards records that are 7 years old from the archive.

    It is begining to take a couple of seconds. This doesnt bother me in the slightest but I would like to show the end-users that the DB is doing something for them so be patient...

    After some research, I have found that there is a prebuilt progress bar. I would like to use this on a form that will open and give the user details as to what is happening and a welcome screen.

    How?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    14,308
    ?? If this happens at startup, how may records could you possibly archive on the second and subsequent startups??

    Seems to me, the first time you start this procedure, the 3 year old records are archived. Are they physically copied to another database, or to filesystem file, or do they remain in your production database? Just trying to determine the logic involved. If they are physically removed to another location, what volume of 3 year old records would exist after the first run of this procedure?

    SysCmd meter

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,440
    I would tend to stay away from the progress bar, different versions of the MSCOMCTL.OCX do not support the progress bar at all and your code will fail unless you distribute a version that works to every user and make sure your code is referencing the correct .OCX file. You can mimic a progress bar using unbound controls and setting the back color which isn't quite so pretty but will work for everything or you can just have a 'notice' text box that you update as the startup procedure happens (I use something similar when opening a database that connects to SQL without a DSN just to let the user know what the delay in opening is about) just throw in a doevents after every update to make sure the textbox is getting updated as it's running through things then clear it out after it's done.

  4. #4
    craig1988 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2014
    Posts
    82
    rpeare

    OK, the plot thickens!!

    The "Notice" text boxes could work. I will look into this. Can you give me some sample code for the DoEvents piece.

    orange

    Should have given more info on this. Backup and archive process is as follows: The db contains a table that records the date of the backup and user details ect... On open the Macro runs, first thing it checks if a record with todays date exists, if so nothing further is done (i.e. only one backup per day). If a record with todays date does not exist the function proceeds. A copy of the back end is made ie BACKUPDATAFILE19022016.accdb and a record is added to the table mentioned with all the details of the backup. It then looks at a further table and checks for records with a date of date() - 3 years (exactly 3 years old), if it finds any appropriate reccords it appends them to seperate DB and deletes them from the live db. There can be anywhere from 5 to 50 records per day.

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,440
    Example:

    craig1988.zip

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

Similar Threads

  1. Create progress bar
    By khhess in forum Programming
    Replies: 8
    Last Post: 09-29-2012, 06:46 PM
  2. Progress Bar
    By pkstormy in forum Code Repository
    Replies: 3
    Last Post: 09-21-2012, 10:27 AM
  3. countdown timer and progress bar
    By yigitki in forum Programming
    Replies: 5
    Last Post: 11-16-2011, 01:20 PM
  4. Progress bar issue
    By TheShabz in forum Programming
    Replies: 11
    Last Post: 11-15-2011, 08:29 PM
  5. How to use progress bar
    By marianne in forum Access
    Replies: 19
    Last Post: 04-01-2009, 09:06 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
  •  
Tech Forums: Microsoft Office Forums