
Mailing Only Selected Form Data as a report from a form
Normally you would limit the report by using the WhereCondition of the
OpenReport action.
Since you want to use the SendObject instead, you could use one of these
ideas to filter the report:
A) Base the report on a Query, and in the Criteria of the query, refer to
the primary key value of the record in the form. The Critieria would be
something like this:
[Forms]![MyForm]![MyControl]
B) Use the Open event of the report to set the report's Filter:
If IsLoaded("MyForm") Then
Me.Filter = "MyField = " & Forms.MyForm.MyControl
Me.FilterOn = True
End If
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to the newsgroup. (Email address has spurious "_SpamTrap")
Quote:
> I am able to create a report, then create a button on a
> form that emails the report as an attachment (it launches
> Microsoft Outlook with the attachement). When I click on
> the button, I see a grayed out area where I could select
> either all records or the current record... It's grayed
> out, though, so right now the SendObject command attaches
> all records to the email message. I only want the
> selected record... so what's the trick to get to the
> grayed out settings???