PC Review


Reply
 
 
Rick Allison
Guest
Posts: n/a
 
      30th Jan 2004
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

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:%(E-Mail Removed)...
> acSysCmdInitMeter takes a text argument, so you don't need
> acSysCmdSetStatus.
>
> Here's an excerpt from the help file:
>
> strMsg = "Reading " & UCase$(strTableName) & "..."
> ' Display message in status bar.
> varReturn = SysCmd(acSysCmdInitMeter, strMsg, lngCount)
> For lngX = 1 To lngCount
> ' Update meter.
> varReturn = SysCmd(acSysCmdUpdateMeter, lngX)
> . ' Do something with record.
> .
> .
> rst.MoveNext ' Go to next record.
>
> Next lngX
>
>
> Since this is a coding question, microsoft.public.access.modulesdaovba

would
> probably have been the most appropriate forum, although
> microsoft.public.access wouldn't have been out of place either.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (No private e-mails, please)
>
>
>
> "Rick Allison" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I really do not know if this belong here but the other groups did not

seem
> > to fit either, so here goes.
> >
> > I want to use acSysCmdInitMeter, acSysCmdUpdateMeter, and

> acSysCmdSetStatus.
> >
> > The first two to get the meter (blue dots) and the setstatus to change

the
> > words. They don't seem to go together. Can they?
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
 
Roger Carlson
Guest
Posts: n/a
 
      30th Jan 2004
Try putting a DoEvents somewhere in the loop.

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org

"Rick Allison" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
> news:%(E-Mail Removed)...
> > acSysCmdInitMeter takes a text argument, so you don't need
> > acSysCmdSetStatus.
> >
> > Here's an excerpt from the help file:
> >
> > strMsg = "Reading " & UCase$(strTableName) & "..."
> > ' Display message in status bar.
> > varReturn = SysCmd(acSysCmdInitMeter, strMsg, lngCount)
> > For lngX = 1 To lngCount
> > ' Update meter.
> > varReturn = SysCmd(acSysCmdUpdateMeter, lngX)
> > . ' Do something with record.
> > .
> > .
> > rst.MoveNext ' Go to next record.
> >
> > Next lngX
> >
> >
> > Since this is a coding question, microsoft.public.access.modulesdaovba

> would
> > probably have been the most appropriate forum, although
> > microsoft.public.access wouldn't have been out of place either.
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (No private e-mails, please)
> >
> >
> >
> > "Rick Allison" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I really do not know if this belong here but the other groups did not

> seem
> > > to fit either, so here goes.
> > >
> > > I want to use acSysCmdInitMeter, acSysCmdUpdateMeter, and

> > acSysCmdSetStatus.
> > >
> > > The first two to get the meter (blue dots) and the setstatus to change

> the
> > > words. They don't seem to go together. Can they?
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      31st Jan 2004
How on earth would that possibly achieve what he's asked for?

TC


"Roger Carlson" <NO-carlsoro-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Try putting a DoEvents somewhere in the loop.
>
> --
> --Roger Carlson
> www.rogersaccesslibrary.com
> Reply to: Roger dot Carlson at Spectrum-Health dot Org
>
> "Rick Allison" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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
> >
> > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
> > news:%(E-Mail Removed)...
> > > acSysCmdInitMeter takes a text argument, so you don't need
> > > acSysCmdSetStatus.
> > >
> > > Here's an excerpt from the help file:
> > >
> > > strMsg = "Reading " & UCase$(strTableName) & "..."
> > > ' Display message in status bar.
> > > varReturn = SysCmd(acSysCmdInitMeter, strMsg, lngCount)
> > > For lngX = 1 To lngCount
> > > ' Update meter.
> > > varReturn = SysCmd(acSysCmdUpdateMeter, lngX)
> > > . ' Do something with record.
> > > .
> > > .
> > > rst.MoveNext ' Go to next record.
> > >
> > > Next lngX
> > >
> > >
> > > Since this is a coding question, microsoft.public.access.modulesdaovba

> > would
> > > probably have been the most appropriate forum, although
> > > microsoft.public.access wouldn't have been out of place either.
> > >
> > > --
> > > Doug Steele, Microsoft Access MVP
> > > http://I.Am/DougSteele
> > > (No private e-mails, please)
> > >
> > >
> > >
> > > "Rick Allison" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > I really do not know if this belong here but the other groups did

not
> > seem
> > > > to fit either, so here goes.
> > > >
> > > > I want to use acSysCmdInitMeter, acSysCmdUpdateMeter, and
> > > acSysCmdSetStatus.
> > > >
> > > > The first two to get the meter (blue dots) and the setstatus to

change
> > the
> > > > words. They don't seem to go together. Can they?
> > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      31st Jan 2004
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.)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)



"Rick Allison" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
> news:%(E-Mail Removed)...
> > acSysCmdInitMeter takes a text argument, so you don't need
> > acSysCmdSetStatus.
> >
> > Here's an excerpt from the help file:
> >
> > strMsg = "Reading " & UCase$(strTableName) & "..."
> > ' Display message in status bar.
> > varReturn = SysCmd(acSysCmdInitMeter, strMsg, lngCount)
> > For lngX = 1 To lngCount
> > ' Update meter.
> > varReturn = SysCmd(acSysCmdUpdateMeter, lngX)
> > . ' Do something with record.
> > .
> > .
> > rst.MoveNext ' Go to next record.
> >
> > Next lngX
> >
> >
> > Since this is a coding question, microsoft.public.access.modulesdaovba

> would
> > probably have been the most appropriate forum, although
> > microsoft.public.access wouldn't have been out of place either.
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (No private e-mails, please)
> >
> >
> >
> > "Rick Allison" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I really do not know if this belong here but the other groups did not

> seem
> > > to fit either, so here goes.
> > >
> > > I want to use acSysCmdInitMeter, acSysCmdUpdateMeter, and

> > acSysCmdSetStatus.
> > >
> > > The first two to get the meter (blue dots) and the setstatus to change

> the
> > > words. They don't seem to go together. Can they?
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      31st Jan 2004
Rick Allison wrote:

>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.
--
Marsh
MVP [MS Access]
 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      31st Jan 2004
"Rick Allison" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)
> 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
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in
> message news:%(E-Mail Removed)...
>> acSysCmdInitMeter takes a text argument, so you don't need
>> acSysCmdSetStatus.
>>
>> Here's an excerpt from the help file:
>>
>> strMsg = "Reading " & UCase$(strTableName) & "..."
>> ' Display message in status bar.
>> varReturn = SysCmd(acSysCmdInitMeter, strMsg, lngCount)
>> For lngX = 1 To lngCount
>> ' Update meter.
>> varReturn = SysCmd(acSysCmdUpdateMeter, lngX)
>> . ' Do something with record.
>> .
>> .
>> rst.MoveNext ' Go to next record.
>>
>> Next lngX
>>
>>
>> Since this is a coding question,
>> microsoft.public.access.modulesdaovba would probably have been the
>> most appropriate forum, although microsoft.public.access wouldn't
>> have been out of place either.


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.
 
Reply With Quote
 
Rick Allison
Guest
Posts: n/a
 
      1st Feb 2004
Thanks to all for your posts.

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


"Dirk Goldgar" <(E-Mail Removed)> wrote in message
news:%23f%(E-Mail Removed)...
> "Rick Allison" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)
> > 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
> >
> > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in
> > message news:%(E-Mail Removed)...
> >> acSysCmdInitMeter takes a text argument, so you don't need
> >> acSysCmdSetStatus.
> >>
> >> Here's an excerpt from the help file:
> >>
> >> strMsg = "Reading " & UCase$(strTableName) & "..."
> >> ' Display message in status bar.
> >> varReturn = SysCmd(acSysCmdInitMeter, strMsg, lngCount)
> >> For lngX = 1 To lngCount
> >> ' Update meter.
> >> varReturn = SysCmd(acSysCmdUpdateMeter, lngX)
> >> . ' Do something with record.
> >> .
> >> .
> >> rst.MoveNext ' Go to next record.
> >>
> >> Next lngX
> >>
> >>
> >> Since this is a coding question,
> >> microsoft.public.access.modulesdaovba would probably have been the
> >> most appropriate forum, although microsoft.public.access wouldn't
> >> have been out of place either.

>
> 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.
> .
> .
> rst.MoveNext ' Go to next record.
>
> Next lngX
>
> Calling SysCmd(acSysCmdInitMeter) will of course reset the progress bar,
> but since that will immediately be followed by updating the progress
> bar, it may be too quick to be noticed. If not, it occurs to me that
> *maybe* you can set Application.Echo False before reinitializing the
> meter and then set it to True again after updating the meter, and thus
> avoid the visual glitch. Again, I haven't tried this approach, but you
> may want to give it a go.
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SYSCMD =?Utf-8?B?SmltUw==?= Microsoft Access VBA Modules 1 12th Dec 2005 09:42 PM
syscmd(602), syscmd(609) david epsom dot com dot au Microsoft Access 4 30th Sep 2005 03:31 AM
SysCmd? Turner Microsoft Access VBA Modules 2 28th Apr 2004 05:06 PM
SysCmd Rick Allison Microsoft Access Database Table Design 1 30th Jan 2004 12:19 AM
syscmd.exe Chrissy Windows XP Performance 2 21st Dec 2003 06:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 AM.