Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hold off PDF

Status
Not open for further replies.

teqtaq

Technical User
Nov 18, 2007
197
US
When printing an Access Report into PDF format and code keeps looping - sometimes Adobe is slow and while first Report is still hanging - another one ready to open up.
There is a function to hold off while PDF created and saved but I forgot which one. Does anyone remember? Thanks
 
I've bodged a delay along these lines to allow another process to run.

Dim sngtimer As Single
sngtimer = Timer
Do While Timer - sngtimer < 1 'Or whatever delay you need
Loop

However, I'm certain there is a more 'correct' method of doing this
 
Sometimes adding a DoEvents will work.

Code:
DoEvents

Other times, when that doesn't work, I've used a message box, although not ideal as it requires a user to click OK to continue the process. But the amount of time it takes for user to click ok is usually enough time to finish the PDF and move on to the next part of the code.

Code:
   MsgBox "Report Name or Comment/Instruction", vbOKOnly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top