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.
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.