pause? (1 Viewer)

dgoulston

Hasn't Got A Clue
Local time
Today, 03:05
Joined
Jun 10, 2002
Messages
403
dustartdate.SetFocus
dateinuse = dustartdate.text
ducalcdate.Caption = dateinuse + "*"
stDocName = "deletetb2"
DoCmd.OpenQuery stDocName, acNormal, acEdit
stDocName = "dayusagecalc"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'-----------------------pause here------------------------------------
stDocName = "dayusage"
DoCmd.OpenReport stDocName, acPreview


i have the code above, is it possible to tell it to wait until the query is finished running before opening the report?

because the report relys on the query being finished but does not wait for it..

thankyou in advance
DAL
 

ColinEssex

Old registered user
Local time
Today, 03:05
Joined
Feb 22, 2002
Messages
9,116
A really crude way to do it would be to have a "For-Next" loop and make it loop before continuing.

Like this

For x = 1 to 50000 (or whatever number you like)
next x

there's bound to be a better way

Col
:cool:
 
R

Rich

Guest
Look up DoEvents, there have been many examples here
 

dgoulston

Hasn't Got A Clue
Local time
Today, 03:05
Joined
Jun 10, 2002
Messages
403
ok i have figured it out and it is great,,

thanx a lot

DAL
 
Last edited:
R

Rich

Guest
There is a search button here at the top of the page, I typed in DoEvents and found pages of them, OK so not every answer wil suit, but there are posts that will
 

Users who are viewing this thread

Top Bottom