Progression Bar

N

Nuno Guerra

Hi.

I would like to have a progression bar in my form until an action is being
executed.
Something like a rectangle that shows de progression from 0% to 100% as an
action/query is being made.

I know that there are some web sites with samples that have the code to be
used for free, but I lost the links. Any one help?
 
P

PC Datasheet

See Below!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee.
Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Contact me.

Create A Custom Progress/Status Meter/Bar Chart



You may find a need for creating a "Progress Meter" on your Form, separate
from the status bar progress meter which is callable by using the sysCmd
function in Access. A Progress meter can be created by using two label
controls, directly on top of one another in the form. Here's how you do it:

1. Create a label control, with a sunken style, (we'll call this lblbase)
and make it's backcolor transparent, and forecolor to black.

2. Create a label control, of 0.00 width, identical in height to the baselbl
(we'll call this lblmeter); align the lblmeter exactly with the left edge of
the lblbase control, and send it to the back (i.e. behind the lblbase.) Make
its edges transparent.

3. To update the progress meter place the following code in the form's
module and send it the current and total amounts to measure progress as
appropriate (you can use a timer event or place the calls in looping code
etc.):

Sub updatemtr (currentamt, totalamount)
' This function changes the color based on progress.
' You set the back color of lblmeter to be a single color if desired.

Dim MtrPercent as Single
MtrPercent = currentamt/totalamount
Me!lblbase.Caption = Int(MtrPercent*100) & "%"
Me!lblmeter.Width = CLng(Me!lblbase.Width * MtrPercent)
Select Case MtrPercent
Case Is < .33
Me!lblmeter.BackColor = 255 'red
Case Is < .66
Me!lblmeter.BackColor = 65535 'yellow
Case Else
Me!lblmeter.BackColor = 65280 'green
End Select
End Sub4. Note this same tip can also be used to create a simple horizontal
bar chart on a report, and is especially handy if you don't know what the
total amount might be before you run the report. (The total amount would be
required to be known a priori if you were to use MS Graph to create the
chart, because you would have to set the scale when creating the chart; with
this method, you don't have to know the total amount before the report is
run.)
 
J

John Marshall, MVP

Ambulance Chasing -- AGAIN!

Placing the solicitation below the signature does not cut it.

John... Visio MVP
 
P

PC Datasheet

Rob,

You're a jerk!!!!

Look at what Al said in his first sentence ---
" I got the following out of one of these newsgroups"
 
D

Douglas J. Steele

Yes, but at least Al acknowledged that it wasn't his own contribution.

Steve, this isn't the first time you've quoted verbatim from someone else's
post without attribution.
 
P

PC Datasheet

OK!!

It's called sharing but since you oppose sharing, that's the last time I
will ever post something like that to help a poster. You have just stolen a
lot of help from future posters!!!
 
J

John Marshall, MVP

So will you say the same thing about your solicitation posts? Or are you
just regressing?

John... Visio MVP
 
R

Rob Oldfield

No Steve. It's called plagiarism. If I see a question that some of
Douglas' code is applicable to, then I'll post that code (crediting Douglas)
or post a link. It's the way that newsgroups work.

Do you really not get it? Al said it wasn't his own code, you didn't. Is
the difference really that complicated?

Why exactly am I a jerk?
 
P

PC Datasheet

You're a jerk because you could have spent the time helping a poster on the
newsgroup rather than responding with your venomous dribble about my
response to this poster. It's the way that newsgroups should work. You
merely partnered with Arno R and John Marshall polluting the newsgroup with
venom. You fully supported their holier than thou campaign against me. You
ought to be proud of yourself!!!!!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee.
Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Contact me.
 
J

John Marshall, MVP

Ah, full regression.

As in all commuities, someone has to deal with the trash. All we have done
is point out your constant pollution of these groups with your
solicitations, unattributed quotes and rants.

John... Visio MVP

PS: For someone who seems to enjoys annoying users with inappropriate posts,
I can not understand why you post personal information to these newsgroups.
In the past year, you have identified the small town where you live and your
wife's name.
 
R

Rob Oldfield

I've been thinking about how to respond to this one, and have decided that I
really don't need to bother commenting on your response.

I'm not trying to take a cheap shot here, but if you even half believe what
you've said here, then I think you should be thinking about getting some
psychiatric help.
 
P

PC Datasheet

Maybe you ought to look at your value system and examine why you are
supporting and promoting Arno R and John Marshall!!!!
 
R

rkc

PC said:
Maybe you ought to look at your value system and examine why you are
supporting and promoting Arno R and John Marshall!!!!

Because they see things clearly and you do not.
 
P

PC Datasheet

Yes or No ---

Do you support Arno R and John Marshall polluting the newsgroups with their
venomous dribble?
 
R

rkc

PC said:
Yes or No ---

Do you support Arno R and John Marshall polluting the newsgroups with their
venomous dribble?

I support pursuading you to stop pimping yourself in the newsgroups.
 
D

Duane Hookom

I vote for Arno R., John Marshall, Rob, rkc, Doug Steele, and every other
News Group user that respects generally acceptable netiquette.
 
P

PC Datasheet

You think your a big man but you can't even answer the question posed to
you!!
 
Top