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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up a delay timer

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
US
I need to set up a delay timer in code to allow an item to be shown before taking the next step.


Any Ideas will be appreciated.


Thanks,
 
Which application ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
What is your actual relevant code and where would you a timer ?
Tips: have a look at the DoEvents function and the Repaint method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I am running this Code on a button click.

Private Sub NotifyBtn_Click()

If Forms![Employee Frm]!Status = 1 Then
DoCmd.OpenReport "Employee Email New", acViewPreview, "", "", acNormal
End If

If Forms![Employee Frm]!Status = 2 Then
DoCmd.OpenReport "Employee Email Revised", acViewPreview, "", "", acNormal
End If

If Forms![Employee Frm]!Status = 3 Then
DoCmd.OpenReport "Employee Email Complete", acViewPreview, "", "", acNormal
End If

DoCmd.RunCommand acCmdSend

End Sub
The problem is....the DoCmd.Runcommand acCmdSend runs before I see the report that is opened by the code above. I want it to wait until the Report is showing and then run. The Report Event selections do not give me any Event Items that would run After the report is open or I would put the DoCmd code on the report itself.

So, I though a delay timer of some sort would give the report time to show before doing the DoCmd action.

 
Why not using the DoCmd.SendObject method instead ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I will have to try this. The reason I use the DoCmd.RunCmmand acCmdSed is because it uses the Report File Menu item to attach the report to an email. When you use this it brings up dialog box asking you what format to use when sending the report. The user must select (usually Snap) and then the email comes up with the Report attached. Do you think the SendObject method would work the same way?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top