T
Tim Johnson
I am trying to do something that should be fairly straightforward, but am
having issues:
I have written a set of subroutines in my db that are fairly processor
intensive, as they run through 3 related recordsets: sub 1 creates a new
Excel file for each record in a set, sub 2 creates a new worksheet for each
record in a related table (table 2), and sub 3 populates/formats varying
cells in each worksheet based on each record in another table that is related
to table 2. These routines exist in one module and are called upon from a
separate form.
The subroutines are currently taking between 5 and 10 minutes to process, as
there is a lot of stuff going on. This is to be expected and is not a
problem. However; I would like the form from which these subs are called
upon to display some sort of progression, so that users don't assume
something's broken or get impatient.
I am not really aiming at a progress bar, but something a bit simpler; so I
have added a label that SHOULD display a caption that updates each time sub1
from above moves to the next record. However, there is no visible change to
the label (I know it's updating, because when I use ctrl+<break>, I see its
changes).
I have added a subroutine to make the system "sleep" for 1000 milliseconds
in between each record, assuming that the issue was that the subs were
processing too quickly to show the changes, but that hasn't helped at all.
I'm reluctant to make the sleep last longer, as it doesn't make a lot of
sense to add large periods of time to a process that already takes quite a
while.
Is there a trick that I can use to show the users progress/action occurring?
Thanks in advance,
Tim
having issues:
I have written a set of subroutines in my db that are fairly processor
intensive, as they run through 3 related recordsets: sub 1 creates a new
Excel file for each record in a set, sub 2 creates a new worksheet for each
record in a related table (table 2), and sub 3 populates/formats varying
cells in each worksheet based on each record in another table that is related
to table 2. These routines exist in one module and are called upon from a
separate form.
The subroutines are currently taking between 5 and 10 minutes to process, as
there is a lot of stuff going on. This is to be expected and is not a
problem. However; I would like the form from which these subs are called
upon to display some sort of progression, so that users don't assume
something's broken or get impatient.
I am not really aiming at a progress bar, but something a bit simpler; so I
have added a label that SHOULD display a caption that updates each time sub1
from above moves to the next record. However, there is no visible change to
the label (I know it's updating, because when I use ctrl+<break>, I see its
changes).
I have added a subroutine to make the system "sleep" for 1000 milliseconds
in between each record, assuming that the issue was that the subs were
processing too quickly to show the changes, but that hasn't helped at all.
I'm reluctant to make the sleep last longer, as it doesn't make a lot of
sense to add large periods of time to a process that already takes quite a
while.
Is there a trick that I can use to show the users progress/action occurring?
Thanks in advance,
Tim