473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,398 developers and data experts.

A Better Progress Bar

PhilOfWalton
1,430 Expert 1GB
Introduction

Frequently with Access databases a process takes a certain amount of time to complete, such as updating a large number of records, or reading information from the internet.
Panic sets in. Has the program crashed?

The usual technique is to show the status bar moving on at the bottom of the screen. However, I feel that this is frequently not seen, and gives very little information about what the progress actually is. In addition, while you are waiting for the process to complete, it’s nice to have something pretty to look at.

So I came up with this floating form:-


which I call ProgressMeterRainbow

Overview
The top line tells us what it is doing - in this case translating.
Second line a bit more information that it is translating from English to Mongolian.
The third line informs us that there are 463 words to translate and on the forth line we find that 308 words have been translated (67%) as seen on the bottom line.
This last line (subject to the words fitting on it) shows the English word and (hopefully) the Mongolian equivalent.

Detail
There are a number of parameters that need setting up, obviously more than on the standard Access Progress bar.
The parameters that can be changed are the start and end colour of the bar. In this example we go from Red to Green, obviously the 5 titles, and the detailed information displayed.
The Progress Meter needs to know how many records it has to process (Often found by moving to the end or a RecordSet and retrieving the RecordCount) and how many records have been processed.

Below is a picture of a sample Db to show the parameters that can be enterd:-


Prettier?

Usage

Here is a sample Db for the above database

https://bytes.com/attachments/attach...ress-meter.zip

I am not going to go into the code because it is reasonably obvious from the sample database.

Briefly, you need to get the total of the number if items to be shown (Often RecordCount)
Open the Progress Meter
Then we set the titles, speed & colours required.
Then we loop round reading each record and increment a counter and display whatever information is required about the record.
Finally we close the ProgressMeter.

The Progress Meter is not restricted to counting records. It can be used for anything where the total number of items to be processed is known, and there is a method of counting the items as they are dealt with.

Hope this may be of use

Phil
Feb 15 '18 #1
6 8035
twinnyfo
3,653 Expert Mod 2GB
Beautiful! Great job, Phil!
Feb 15 '18 #2
Nauticalgent
100 64KB
The link doesn't seem to be working...has it been removed or is my equipment faulty...(good thing my wife isn’t unable to answer)
Jun 15 '18 #3
PhilOfWalton
1,430 Expert 1GB
Someone has committed a Cardinal sin and needs keel hauling. I haven't a clew what has gone wrong, but here is the link again.

Phil (regrettably having to sell my boat)
Jun 15 '18 #4
Nauticalgent
100 64KB
It worked that time, thanks. I have office 365 at home and somehow the version of Access is 64 bit and I am too lazy to convert it...so...it will have to wait until I get to work on Monday since that is where I intend to use it.

Someone has committed a Cardinal sin and needs keel hauling.
A sad but common occurrence in my life! My sailing days are over as I have retired from the Navy but the memories shall linger forever...

Edit: I have always been impressed by individuals who have managed to figure out Class Modules. I have tried for over a year to
1. Figure out how to do them
2. Find a true utility for them.

I did manage to find a very appropriate situation to use one but if it had not been for a very similar existing Module available on the internet, I would still be sorting it out. What can I say, I simply and NOT a programmer.

I cant wait to get to work on Monday and put this to use. Very impressive and thanks again for sharing.

John
Jun 15 '18 #5
Nauticalgent
100 64KB
I was able to run it at work with no issues. The processes in need to incorporate are slightly more complex than stepping through a record set - this will work perfectly though.

Very well written and documented. Excellent work!
Jun 18 '18 #6
hi phil, that link is giving 404 (not found ...)
Dec 16 '19 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Paul | last post by:
i have been working with vb6 for a while but never had the pleasure of using progress bars. That is until now, one of the programs i have written has just been modified so that large csv files of...
13
by: Martin Mrazek | last post by:
Hi, I check data validity in html form by JS. Something like for (i=0; i<document.form.elements.length; i++) { chechkValidity(i); } Unfortunately, the form has about two thousands elements...
5
by: James Morton | last post by:
I have a Static DataSet in a class file that I am using globally between a few forms. The main form populates the dataset through a menu option which invokes ReadXML in the class file to populate...
2
by: Jack Addington | last post by:
I am working on app that currently all resides on the same machine but plan to pull the database off and try to move all the datafunctionality to a remote machine. I have a data function that is...
2
by: jez123456 | last post by:
Hi, thanks for the previous advice on progressbars with showing the percentage. I would now like to create a less clunky version. I.e at the moment my progressbar shows 7 separate steps. Some...
6
by: Kyle | last post by:
I want to do a single pix update bar instead of the big block that progress bars usually use. I can't seem to find any info on how to do this. Thanks in advance for any help, Kyle
3
by: Ritesh Raj Sarraf | last post by:
Hi, I have a small application, written in Python, that uses threads. The application uses function foo() to download files from the web. As it reads data from the web server, it runs a progress...
0
by: Tony Lance | last post by:
Big Bertha Thing progress Cosmic Ray Series Possible Real World System Constructs http://web.onetel.com/~tonylance/progress.html Access page to 6K Web page Astrophysics net ring access site...
3
TheSmileyCoder
by: TheSmileyCoder | last post by:
Usually as developers we do our best to ensure that function calls occur almost instantaneous with no discernible wait time for the user. If a process takes more than a quarter of a second, or...
6
PhilOfWalton
by: PhilOfWalton | last post by:
Introduction Frequently with Access databases a process takes a certain amount of time to complete, such as updating a large number of records, or reading information from the internet. Panic...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.