Email attachment Based on Current Form

B

Ben Pelech

I created a report that its only purpose is to send an email to another
department as an attachment. The report is based on a query. The current
code for the email button is

Private Sub Send_Email_Click()
On Error GoTo Err_Send_Email_Click

Dim stDocName As String

stDocName = "RptEmailTemplate"
DoCmd.SendObject acReport, stDocName

Exit_Send_Email_Click:
Exit Sub

Err_Send_Email_Click:
MsgBox Err.Description
Resume Exit_Send_Email_Click

End Sub

My problem, is that the users are experiencing errors and blank forms
sometimes because they are messing up when putting in the parameters. So to
eliminate the possibility, I thought it would be easier to have this
attachment pull based on the current record displaying on the form. Is this
possible? Currently the query parameters ask them for the date and loan
number.

Any help would be greatly appreciated.

Thanks

Ben P
 

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