SendObject - Two Email pages

M

Melissa

I've just learned how to use the SendObject command and I've run into a
problem. I created a button that once the user clicks on it (from a PO
form), it creates an email with a report attached. The report is filtered to
only send pages of the report that match the PO number from the form. Works
great except when I set the "Edit Message" argument to Yes. After I send
the email or close the email window, another one shows up behind it. Am I
doing something wrong?

My macro is set up as follows:
OpenReport (with Where argument set)
SendObject (with Edit Message argument set to "Yes")
CloseReport
 
M

Mike

Hi Melissa,

The reason you receiving another request is because your macro is opening
and sending the report. If you just want to send the report by email, then
remove the open report macro and just use the SendObject, if you need to view
the report for accuracy before emailing, you can always open up from the
email attachment.
 
M

Melissa

If I don't open the report using a where clause, then it ends up generating
the report for all the records, which I don't want. I didn't notice a
"WHERE" clause in the SendObject macro, so I'm not sure how to go about
resolving this issue. Any suggestions?
 
S

Steve Schapel

Melissa,

The easiest way to do this is to make a query, with a reference to the PO
number control on your PO form in the Criteria. And then use this query as
the Record Source of the report.
 

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