Solved Simulate a Progress Bar on a Continuous Form (1 Viewer)

HillTJ

To train a dog, first know more than the dog..
Local time
Yesterday, 12:08
Joined
Apr 1, 2019
Messages
731
Friends, I have a continuous form, a bound control 'PercentProgress' into which the user enters a value to represent their progress with the task & an unbound textbox 'txtProgress' into which I wish to populate some kind of progress bar to visualise the task progress. I have simulated this with using the string('length','character') function to propagate a string of characters according to the value of PrecentProgress, but of course this technique does not work on a continuous form.

Any ideas would be appreciated.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:08
Joined
Oct 29, 2018
Messages
21,479
I don't see why it wouldn't work if you add the calculated string in your form's record source.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Yesterday, 12:08
Joined
Apr 1, 2019
Messages
731
@theDBguy , never thought if that!. Will give it a go.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Yesterday, 12:08
Joined
Apr 1, 2019
Messages
731
@theDBguy , worked fine. Thanks for the prompt response. I continue......
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 18:08
Joined
Feb 28, 2001
Messages
27,197
The method I use sometimes works pretty well, but it requires me to know the minimum and maximum values of what I'm representing.

I create two rectangles, long in width, short in height. Something like 0.0625" height, but smaller is possible. Width about 1 inch narrower than the form's width. Then overlap them and determine which one is top, which one is bottom. Both of them are set to invisible normally, but when I want to do a moving bar, I put the bottom to have no backcolor but some color for bordercolor that will stand out against the background. The top bar starts with width 1. (This is 1 TWIP, which is the display unit for all Access forms. 1 inch = 1440 twips. I also set it to have a decent contrasting color vs. the form's backcolor.

Then when I want to update the progress bar, I compute

[top bar].width = ( [bottom bar].width * [current measurement value] ) / [max measurement value]

IF you tried to do this on a progress bar more than 11" long and didn't use LONG for the current and max values, you might have overflow issues. If the incremental change in the current value is VERY small, you might get some flickering depending on how quickly you make progress.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Yesterday, 12:08
Joined
Apr 1, 2019
Messages
731
@The_Doc_Man , I started thinking about a method bit like you described, but got a bit confused as I'm aiming to display the 'progress' visual on a continuous form. Simple on a single form but I could not get it to work on a continuous form. @theDBguy 's technique worked fine. I just might play with the character to see if I can find one that looks better. I'm currently using 'x's. Appreciate the advice. Cheers
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 00:08
Joined
Sep 12, 2006
Messages
15,658
I'm not sure what you are trying to do. If it's just showing the status of an ongoing process, then there is already a progress meter available.

If you are trying to have a user indicate a semi permanent status that changes from time to time, can you do that by counting a number of check boxes, or by evaluating a status flag of some sort, to take away the users responsibility for it?

(I deleted my first comment because I wasn't quite sure what you needed)
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 19:08
Joined
May 21, 2018
Messages
8,543

For a continuous form if you want something like this make a table of images and have another field for image value (i.e. .1,.2,.3...)
Then link progress to image value. Make gave to round the progress field.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Yesterday, 12:08
Joined
Apr 1, 2019
Messages
731
All contributer, thanks for your time. Got it. See my post #6.
 

Users who are viewing this thread

Top Bottom