Progress Indicator wanted

I have never known a process to be interrupted just to service a timer event, even just holding a mouse button down stalls the timer. Most people have to resort to inserting a DoEvents to overcome those problems.

I prefer to look at the timer as something that Access will service if it has nothing else to do.

But it’s all just conjecture until we know what the process is.
 
I have never known a process to be interrupted just to service a timer event, even just holding a mouse button down stalls the timer. Most people have to resort to inserting a DoEvents to overcome those problems.

I prefer to look at the timer as something that Access will service if it has nothing else to do.
Just had a quick test and it seems to be the case. There's definitely no asynchronicity. I thought the form's timer event might be a way of multi-threading but it's obvious that VBA is very much single-threaded :eek:.
 
are you saying that using a timer will stop the main process ?
or is it because you loaded a Popup form ?

I realy loved your idea :D
They can continuously bang their heads against a brick wall if they want to see moving objects :D
 
I've used both the hourglass and a message. I was looking for something a bit prettier!!
John
 
I have never known a process to be interrupted just to service a timer event, ...QUOTE]I wonder how Access handles the hourglass :confused:

are you saying that using a timer will stop the main process ?
or is it because you loaded a Popup form ?
It won't interrupt the main process, it will wait until the process has finished before starting up the timer. Like ChrisO mentioned here:
I prefer to look at the timer as something that Access will service if it has nothing else to do.

I've used both the hourglass and a message. I was looking for something a bit prettier!!
John
If it was going to be used by just myself and I have a process that takes 10 minutes, I would display a "static" picture of the seaside:)

In all seriousness, there's no other "pretty" way of getting this running except via a progress bar, progress meter or the hourglass, i.e. if we're talking about having something moveable. Updating a progress bar adds to the processing time.
 
ah - i see - without doevents, the timer doesn't a help!

so - what does your 10 minute process do?

it seems a long time -

can you break that into smaller bits, somehow?
 
so only the hourglass will work indivisible process :(
 
so - what does your 10 minute process do?

it seems a long time -

can you break that into smaller bits, somehow?
It does seem like a long time. Could you also tell us an approximation of how many records get affected during this one process?

By the way, if you want to use the progress bar you can use a Recordset to update the records and everytime it loops update the progress bar. But like already mentioned, this will add to the processing time.
 
The 10-minute process works on 3 excel spreadsheets and 2 text files, manipulates the data and creates a report for Uncle Sam, handling tax reporting issues for a telecoms multinational.

Just to give you an indication, the initial plan was to do this with Oracle etc at a substantial cost and they could not believe that Access+Jet could handle this.

It is a tedious process which takes one person at least 5 working days to complete manually. IT has been in production for 3 years now and the client is very happy.

Hope this helps,
John
 
if its executing access statements to process a spreadsheet, then this isn't atomic.

surely you can count a number of disctinct operations - and at the very least update a progress bar as each of these is completed.

what we have just been clarifying is that if you have a statement

docmd.openquery "somequery"

then that is a SINGLE process, so however long it takes, a user-defined progress bar is no use (unless access does one automatically) - as you only have 1 action. (and a timer won't get any time either!!)

but if you are opening/closing text files/reading in data/opening spreadsheets etc, then you have loads of different actions each of which can go towards updating a progress bar.

I have got to say, 10 minutes is a helluva lotta flops for a cpu. I wouldn't be surprised if that couldn't be reduced somewhere. And I also gotta say, if you can define a problem, you can almost certainly solve it in vba, whatever oracle guys say.
 
Last edited:
Honestly, I like the record set idea; however, I would modify it a bit.

First, use the code to figure out how many records meet the query criteria.

Second, have each record returned. While this is going on, have a label that updates the records that have been returned (eg. Recalling 5 of 1,350 Records) This can count up as fast as the records are retreived. Your status bar can either be based on the total number, or in short multiples of the number, having the bar reset every 10 records.

As for the bar itself, have one label that is a neutral color. Create two more labels, one light blue and the other slightly darker. Make each label half the width of the neutral label. Then have their length expand as records are retreived. This should be appeasing to most users.
 
Honestly, I like the record set idea; however, I would modify it a bit.

First, use the code to figure out how many records meet the query criteria.

Second, have each record returned. While this is going on, have a label that updates the records that have been returned (eg. Recalling 5 of 1,350 Records) This can count up as fast as the records are retreived. Your status bar can either be based on the total number, or in short multiples of the number, having the bar reset every 10 records.

As for the bar itself, have one label that is a neutral color. Create two more labels, one light blue and the other slightly darker. Make each label half the width of the neutral label. Then have their length expand as records are retreived. This should be appeasing to most users.
make sure it won't double your process time.
it can be very time consuming compared to the recordsets updates
 
I have a totaly theoretical question
If I create a DLL (No chance as I have no idea how to :D ) that will use the system timer to show a moving object, will this ever work, or will the Access process prevent the update of the form view ?
 
The way I see it is that Access will not interrupt itself using its own timer event.
(It would be like saying; I’m part the way through doing some heavy lifting but I think I’ll suspend that to do some pretty stuff.)

But I think you will find that even if Access is doing some heavy lifting, Windows will still service other applications.

For example; can we receive an email during the heavy lifting?
And Access can spawn other applications asynchronously using the Shell command.

So, we take those two ideas, add two tons of speculation and wonder if the following would work: -

Access spawns a small animated PowerPoint application asynchronously using the Shell command.
Access then starts its indivisible process.
Throughout the Access process Windows updates the PowerPoint animation.
Access finishes its indivisible process and shuts down PowerPoint.

Questions:
Does it work?
Does it slow Access?
Who knows enough about PowerPoint to produce a small, lightweight animated application, preferably with a transparent background? (I don’t.)
Who has a long Access indivisible process to test it on? (I don’t)

But it might work.

Chris.
 
My question was about refreshing the Access form at the same other process is doing the job.

I did some search an look what I found:
http://www.teebo.com/activex.htm

I think it's a fair price for developer license.
I only tested the Tooltip and it work smoothly in AC2003
 
Smig.

I think you will find that most developers shy away from ActiveX controls.

They are fine when they work but how do you fix them if they don’t?

Chris.
 
well a long indivisible access process

this hangs forever until you hit ctrl-break, so good enough to try anything out.

while true
wend


its what I used to verify that a form with a timer wouldn't do its stuff.
 
I think I'll use the toolTip. I think it realy shine.
In case it will stop from working I'll look for another solution or completely remove it. It's not the main core of my app, only to add some sparks :)

In any case, I still have no answer to my question:
Will Access prevent the form (Access form) to be updated while it's busy doing another process ?
 
Smig.

>>Will Access prevent the form (Access form) to be updated while it's busy doing another process ?<<

By very definition, yes.
If Access can update one of its own Forms it wasn’t busy doing another process.

Why not try Dave’s suggestion?
Create a timer event that updates a text box on a Form at 1 millisecond intervals.
Place a command button on the Form and run Dave’s code.

Does the timer continue to update the text box?

Chris.
 
Chris, I know now Access timer will only start after the other process ended.

I'm asking if I put on this form an object using the system timer to create the animation on the form (Not Access timer).
will the running Access process prevent the refresh of the form view.
 

Users who are viewing this thread

Back
Top Bottom