EMailing a report in Access 2003

S

Safari Man

I am trying E Mail a report from a form in an Access database. I have it
working but here is my question. I use the DoCmd.OpenReport to pass the
criteria for the report, but using this method, I must either print the
report when it is opened (if I use acViewNormal) or have a print preview pop
up (if I use acViewPreview). I don't want to print the report at all. I
just want to use the "SendObject" method to send it as a RTF file attached to
an E Mail. Is there a way to suppress all print activity when using
"OpenReport" or is there another method I should be using to achieve this??

If anyone can help. I'd be very appreciative.

Thanks,

Russ
 
S

Safari Man

Thanks for the quick response. as I stated previously, I've got the EMail
portion working fine. I just want to avoid the inconvenience of having a
"Print Preview" open each time my app sends a notification E mail. What I
am really looking for is closely akin to "OpenReport" but without the
requirement that some type of print operation be carried out.

Russ
 
R

ryguy7272

Maybe something like this:
If SysCmd(acSysCmdGetObjectState, acReport, "rptFilter") =
acObjStateOpen Then
DoCmd.Close acReport, "rptFilter"
End If

Notice: "rptFilter" is the name of your report.
If that doesn't work, post your code so we can see what you see.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top