E-Mailing a report that corresponds with the record from form

G

Guest

Hello,

I have a command button on a form that e-mails a report as an attachment.
It's currently showing all records. How do I select only the record currently
showing on the form? My report's source is the table, not a query.

Thank you so much! Laurie

Here is my code:

Private Sub E_Mail_Case_Click()
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
On Error GoTo Err_E_Mail_Report_Click

Dim stDocName As String

stDocName = "Inquiry Report"
DoCmd.SendObject acReport, stDocName

Exit_E_Mail_Report_Click:
Exit Sub

Err_E_Mail_Report_Click:
MsgBox Err.Description
Resume Exit_E_Mail_Report_Click

End Sub
 
T

Tony Williams

I would have thought the easy way was tot change the source to a query based
on your table and include parameters to filter the record you want.
Good luck
Tony
 
G

Guest

Thanks for your reply Tony.

So the user would be asked for an input value in a message box? That's fine,
but I'm wondering if there is a more automatic way-- we don't have
sophisticated or patient users, so the simpler and fewer steps, the better.

Laurie
 

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