A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

query progress meter



 
 
Thread Tools Display Modes
  #1  
Old December 3rd, 2004, 03:11 AM
Bob White
external usenet poster
 
Posts: n/a
Default query progress meter

Access provides a progress meter by using varReturn =
SysCmd(acSysCmdInitMeter, strMsg, lngCount), etc. I have used this as
recommended to provide the user with a sense that something is happening. I
am running a lengthy append query (20 or 30 seconds) at database startup.
In the Main Menu form (first form to open) _OnLoad event, I run the query,
and I am trying to use the progress meter while this query is running. I am
using the form's OnTimer event to increment a counter used to update the
SysCmd meter. As near as I can tell, the timer event isn't hitting while
the query is running. It appears that Access totally halts while the query
is running. Is there some way that I can show a status bar progress meter
while a query is running?

Thanks,
Bob White


  #2  
Old December 3rd, 2004, 03:29 AM
Arvin Meyer
external usenet poster
 
Posts: n/a
Default

This should work:

http://support.microsoft.com/default...;EN-US;Q103404

You shouldn't need to use the form's timer.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Bob White" wrote in message
...
Access provides a progress meter by using varReturn =
SysCmd(acSysCmdInitMeter, strMsg, lngCount), etc. I have used this as
recommended to provide the user with a sense that something is happening.

I
am running a lengthy append query (20 or 30 seconds) at database startup.
In the Main Menu form (first form to open) _OnLoad event, I run the query,
and I am trying to use the progress meter while this query is running. I

am
using the form's OnTimer event to increment a counter used to update the
SysCmd meter. As near as I can tell, the timer event isn't hitting while
the query is running. It appears that Access totally halts while the

query
is running. Is there some way that I can show a status bar progress meter
while a query is running?

Thanks,
Bob White




  #3  
Old December 3rd, 2004, 09:29 AM
smedley
external usenet poster
 
Posts: n/a
Default

http://www.ardice.com/Games/Board_Ga...via/30_Seconds
  #4  
Old December 3rd, 2004, 06:25 PM
Bob White
external usenet poster
 
Posts: n/a
Default

Hi Arvin,
My problem is that I'm not looping through a recordset, I'm running a canned
query. No code appears to execute while the query is running, so I don't
know how to make the progress meter increase. If I just start it before the
query is executed, all I can do is move the meter to 100% after the query
finishes executing. That's why I tried the timer event, but it doesn't run,
either (I think, I'm hoping I'm wrong here).
Thanks,
Bob

"Arvin Meyer" wrote in message
...
This should work:

http://support.microsoft.com/default...;EN-US;Q103404

You shouldn't need to use the form's timer.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Bob White" wrote in message
...
Access provides a progress meter by using varReturn =
SysCmd(acSysCmdInitMeter, strMsg, lngCount), etc. I have used this as
recommended to provide the user with a sense that something is

happening.
I
am running a lengthy append query (20 or 30 seconds) at database

startup.
In the Main Menu form (first form to open) _OnLoad event, I run the

query,
and I am trying to use the progress meter while this query is running.

I
am
using the form's OnTimer event to increment a counter used to update the
SysCmd meter. As near as I can tell, the timer event isn't hitting

while
the query is running. It appears that Access totally halts while the

query
is running. Is there some way that I can show a status bar progress

meter
while a query is running?

Thanks,
Bob White






  #5  
Old December 3rd, 2004, 08:29 PM
Arvin Meyer
external usenet poster
 
Posts: n/a
Default

"Bob White" wrote in message
...
Hi Arvin,
My problem is that I'm not looping through a recordset, I'm running a

canned
query. No code appears to execute while the query is running, so I don't
know how to make the progress meter increase. If I just start it before

the
query is executed, all I can do is move the meter to 100% after the query
finishes executing. That's why I tried the timer event, but it doesn't

run,
either (I think, I'm hoping I'm wrong here).
Thanks,
Bob


I think you may be right. The last time I used a timer event was the Timer
control in VB4 probably before Access 97. I can't remember for sure but
there were issues then, although I think they were solved because it was a
control event, not a form event. If you knew how long it would take, you
could probably construct a loop that moved 100 increments (0-100%) at the
same speed.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access


  #6  
Old December 3rd, 2004, 11:21 PM
Randy
external usenet poster
 
Posts: n/a
Default

Bob White wrote:

Access provides a progress meter by using varReturn =
SysCmd(acSysCmdInitMeter, strMsg, lngCount), etc. I have used this as
recommended to provide the user with a sense that something is happening.
I
am running a lengthy append query (20 or 30 seconds) at database startup.
In the Main Menu form (first form to open) _OnLoad event, I run the query,
and I am trying to use the progress meter while this query is running. I
am
using the form's OnTimer event to increment a counter used to update the
SysCmd meter. As near as I can tell, the timer event isn't hitting while
the query is running. It appears that Access totally halts while the
query
is running. Is there some way that I can show a status bar progress meter
while a query is running?

Thanks,
Bob White


Bob, you never posted the query or type of query you want the progress bar
for.

-Randy


  #7  
Old December 4th, 2004, 03:44 PM
Bob White
external usenet poster
 
Posts: n/a
Default


"Arvin Meyer" wrote in message
...
"Bob White" wrote in message
...
Hi Arvin,
My problem is that I'm not looping through a recordset, I'm running a

canned
query. No code appears to execute while the query is running, so I

don't
know how to make the progress meter increase. If I just start it before

the
query is executed, all I can do is move the meter to 100% after the

query
finishes executing. That's why I tried the timer event, but it doesn't

run,
either (I think, I'm hoping I'm wrong here).
Thanks,
Bob


I think you may be right. The last time I used a timer event was the Timer
control in VB4 probably before Access 97. I can't remember for sure but
there were issues then, although I think they were solved because it was a
control event, not a form event. If you knew how long it would take, you
could probably construct a loop that moved 100 increments (0-100%) at the
same speed.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access


I can measure how long the query takes, but I can't get a loop to execute
while the query is running. It seems like EVERYTHING stops until the query
is done. I've tried a lot of variations at this point. I found some code
from a nz site on a google search that claimed to run the progress meter
during query execution, but it didn't work. I've been working this control
event versus form event concept, to no avail. I'm running Access 97. In
the meantime, I've broken the query into parts and am able to show a jerky
progress meter by updating it between the different queries. It bothers me
to realize that I have seen similar clunky meter movement in other programs.
You'd think there would be a way.
Bob


  #8  
Old December 4th, 2004, 07:38 PM
Randy
external usenet poster
 
Posts: n/a
Default

Bob White wrote:

I can measure how long the query takes, but I can't get a loop to execute
while the query is running. It seems like EVERYTHING stops until the
query
is done. I've tried a lot of variations at this point. I found some code
from a nz site on a google search that claimed to run the progress meter
during query execution, but it didn't work. I've been working this
control
event versus form event concept, to no avail. I'm running Access 97. In
the meantime, I've broken the query into parts and am able to show a jerky
progress meter by updating it between the different queries. It bothers
me
to realize that I have seen similar clunky meter movement in other
programs.
You'd think there would be a way.
Bob


Bob, what query or kind of query are you trying to execute?

-Randy


  #9  
Old December 6th, 2004, 11:57 AM
Arvin Meyer
external usenet poster
 
Posts: n/a
Default

VB/VBA is sequentially run code. What you will need to do is suspend that
briefly while you take the time to update your meter. Try using "DoEvents"
inside the loop to relinquish control of the thread to the Operating System
and other threads. It may be just the ticket you need.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"Bob White" wrote in message
...

"Arvin Meyer" wrote in message
...
"Bob White" wrote in message
...
Hi Arvin,
My problem is that I'm not looping through a recordset, I'm running a

canned
query. No code appears to execute while the query is running, so I

don't
know how to make the progress meter increase. If I just start it

before
the
query is executed, all I can do is move the meter to 100% after the

query
finishes executing. That's why I tried the timer event, but it

doesn't
run,
either (I think, I'm hoping I'm wrong here).
Thanks,
Bob


I think you may be right. The last time I used a timer event was the

Timer
control in VB4 probably before Access 97. I can't remember for sure but
there were issues then, although I think they were solved because it was

a
control event, not a form event. If you knew how long it would take, you
could probably construct a loop that moved 100 increments (0-100%) at

the
same speed.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access


I can measure how long the query takes, but I can't get a loop to execute
while the query is running. It seems like EVERYTHING stops until the

query
is done. I've tried a lot of variations at this point. I found some code
from a nz site on a google search that claimed to run the progress meter
during query execution, but it didn't work. I've been working this

control
event versus form event concept, to no avail. I'm running Access 97. In
the meantime, I've broken the query into parts and am able to show a jerky
progress meter by updating it between the different queries. It bothers

me
to realize that I have seen similar clunky meter movement in other

programs.
You'd think there would be a way.
Bob




 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Return repeats info in "8s" Joy Rose Running & Setting Up Queries 14 October 13th, 2004 10:07 PM
Too Few Parameters error Mail Merge Access Parameter Query Tony_VBACoder Mailmerge 3 September 14th, 2004 12:15 PM
Show records from query 1 or query 2 depending Running & Setting Up Queries 1 September 10th, 2004 12:35 AM
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM
surely a form with a ListBox can be used in a query? 1.156 Running & Setting Up Queries 14 June 2nd, 2004 04:54 PM


All times are GMT +1. The time now is 08:48 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.