emailing current page

M

Martyn Ryder

I need to set a criterioa so that I only send the current page the record is
on as an email. I can do this with a printed report but not with a SendObject
click button what is the visual basic code I should use. For a printed report
on the current page I use the follwoing commands but they do not work with a
Send report can someone help please Thanks Martyn

DoCmd.SendObject acReport, stDocName, acSendReport, , "[OrderID] = " &
Me!OrderID
 
D

Dale Fye

Martyn,

You cannot filter the that way in the SendObject method.

The only way I have figured out to do this is to modify the query on which
the report is based to include a WHERE clause that includes a control on a
form. Something like:

WHERE [ID] = Forms!frm_Main.OrderID

This may mean that you have two reports, one for your printed report, and
another for a single record report that will be sent using SendObject. In
this case, the query for the second report would contain the reference to
your OrderID field.

HTH
Dale
 

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