I want to use sendobject based upon the active form record. I would like to
automatically send it as a snapshot. How would I accomplish this?
DoCmd.SendObject acSendReport, "Tolerance_report", , , , , "Sedalia Out of
Tolerance Report", , True
This is what I have so far.
Any help will be appreciated,
Pixie
Since SendObject lacks the WhereCondition you use with OpenReport, you must
apply a Filter in the Open event of the report.
1. In the General Declarations section (top) of a standard module (Modules
tab of Database window), enter:
Public gstrReportFilter As String
2. In the Open Event procedure of your report:
If gstrReportFilter <> vbNullString Then
Me.Filter = gstrReportFilter
Me.FilterOn = True
gstrReportFilter = vbNullString
End If
3. Just above your SendObject code, assign the string, e.g.:
gstrReportFilter = "ID = " & Me.ID

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I want to use sendobject based upon the active form record. I would like to
> automatically send it as a snapshot. How would I accomplish this?
[quoted text clipped - 6 lines]
> Any help will be appreciated,
> Pixie
Primepixie - 16 Mar 2006 14:33 GMT
I did it by opening the report the using the send object and then closing the
report when it was all done.
Thank you very much for the help.
Pixie
> Since SendObject lacks the WhereCondition you use with OpenReport, you must
> apply a Filter in the Open event of the report.
[quoted text clipped - 23 lines]
> > Any help will be appreciated,
> > Pixie
mattc66 - 01 Dec 2006 00:20 GMT
Where did you put your code for the SendObject on the form event or before?
>I did it by opening the report the using the send object and then closing the
>report when it was all done.
[quoted text clipped - 6 lines]
>> > Any help will be appreciated,
>> > Pixie

Signature
Matt Campbell
mattc (at) saunatec [dot] com