SysCmd??

  • Thread starter Thread starter Rick Allison
  • Start date Start date
R

Rick Allison

This is a thread from another newgroup. Please see below to fill in what
has happened... Hopefully Douglas will see this but if not can anyone else
help based on their experience?

what I want to do is change strMsg inside the For loop. Something like:
strMsg = "Processing row " & rownbr " of " & TotalRows & "..." but keep the
UpdateMeter running too.

Have you ever tried doing that? Is that even possible?

Thanks,

Rick
 
No, I don't believe it is possible. (On the other hand, I don't really see
any point in it, so I've never bothered searching for a way to make it
work.)
 
Rick said:
This is a thread from another newgroup. Please see below to fill in what
has happened... Hopefully Douglas will see this but if not can anyone else
help based on their experience?

what I want to do is change strMsg inside the For loop. Something like:
strMsg = "Processing row " & rownbr " of " & TotalRows & "..." but keep the
UpdateMeter running too.

Have you ever tried doing that? Is that even possible?


I played around with this a bit and I don't think it is
possible. Clearly, acSysCmdSetStatus removes the progress
meter, so that's out.

Unfortunately, acSysCmdUpdateMeter only takes the % progress
value, so you can not use it to update the text part
specified with acSysCmdInitMeter.

I never found it important enough to go to the trouble, but
the only way I can think of doing what you want is to create
a form with a couple of text boxes, one for the text and
another for the color progress bar. It's easy to set the
Width property to indicate the % complete. Just remember to
use the Repaint method to keep the display up to date.

I'm sure this question has come up a few times before, so
you can probably google the newsgroups archives for some
examples.
 
Rick Allison said:
This is a thread from another newgroup. Please see below to fill in
what has happened... Hopefully Douglas will see this but if not can
anyone else help based on their experience?

what I want to do is change strMsg inside the For loop. Something
like: strMsg = "Processing row " & rownbr " of " & TotalRows & "..."
but keep the UpdateMeter running too.

Have you ever tried doing that? Is that even possible?

Thanks,

Rick

The only thing I can think of using the built-in progress meter is to
re-initialize the meter inside the loop and then immediately update it.
Unless the processing of each row takes a very long time, you wouldn't
want to do this for every record, but maybe only every 100 or so, or
1000, or whatever seems appropriate. I have not tried it, but you might
try this variation:

For lngX = 1 To lngCount

If lngX Mod 100 = 0 Then
' Update the message accompanying the meter, by
' reinitializing the meter.
strMsg = "Processing row " & lngX & " of " & lngCount &
"..."
varReturn = SysCmd(acSysCmdInitMeter, strMsg, lngCount)
End If

' Update meter.
varReturn = SysCmd(acSysCmdUpdateMeter, lngX)
' Do something with record.
 
Thanks to all for your posts.

I will continue to play with ideas but for now I know the limit of SysCmd.
 
Back
Top