From: Dirk Goldgar on
"Bob Vance" <rjvance(a)ihug.co.nz> wrote in message
news:ON4Qycr3KHA.348(a)TK2MSFTNGP04.phx.gbl...
>
> You are right Dirk the report is not open so I would need to have this
> code on the On Deactivate, do you think?

"the report is not open" -- did you mean, "the form is not open"? It's the
form that appears to be referenced by the query that is driving the report,
so the *form* must be open when you open or export the report.

I don't have enough information about what you're doing to answer your
question that I quoted above. All I can say is that the form must be open
when you run the report. If the code you posted, which uses SendObject to
send the report in an e-mail, is in a command button on the form in
question, then the form *is* open. If the button is on some other form,
then maybe you closed the original form, and you could avoid doing that.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)