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

L

Laurie

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
 
L

Laurie

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