sendobject

P

Primepixie

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
 
A

Allen Browne

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
 
P

Primepixie

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
 

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