How to delay

Just to give you another option. While watching Winrar last night (boring life) I noticed that while unzipping it created temp files which are gone when the final file was completed.

Maybe bullzip does the same thing while zipping/unzipping. You could test for the existance of these.
 
Hi Everybody,
Darbid, RG, and Dave (gemma-the-husky), thank you so much for your help. Darbid's link provided the EnumWindows code that let me identify BullZip's class, which I could then add to the code in RG's link for IsAppRunning.

Here's that piece:
Code:
        Case "bullzip":     strClassName = "ThunderRT6FormDC"

Then I added a loop before sending each Report to BullZip:
Code:
Do While fIsAppRunning("bullzip")
Loop

And it seems to work fine.

I can't thank you all enough for your help. :)
 
Excellent. I would add a DoEvents to your loop to give Access some cpu time.
Code:
Do While fIsAppRunning("bullzip")
   DoEvents
Loop
You might also want to bail out for some reason so maybe looking for the Escape key would be useful.
 
Last edited:
Thank you, RG. I've seen the DoEvents thing in people's code before, but I didn't really understand what I read in the Help file. Can you refer me somewhere that explains it?

The Escape key thing is a good idea too. I'm going to start searching for a way to code that - I don't know how at the moment.

I really appreciate your help!!
 
Even though Access is single threaded, it is still multi-tasked. That means that some tasks is Access can get to run more often than others depending on the priority of the task. The loop you had holds the cpu right there in the code while issuing a DoEvents returns the cpu to the tasker and would allow the keyboard input task to run for example.
 
Last edited:
This is what's great about the internet - ghudson, it's more than a year later, but your little bit of code saved me a lot of time today, thanks a lot for sharing.

Regards
Meltdown

How about a few years later, hello and thanks from 2013 :-)
 
is there a way to use this code but have the number of seconds that you want to wait be set depending on your record be based off a field in a table?
 
You'll need to tell us which posting you used but the answer is almost certainly yes.
 

Users who are viewing this thread

Back
Top Bottom