emailing current page

  • Thread starter Thread starter Martyn Ryder
  • Start date Start date
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
 
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
 
Back
Top