email current record not working?

M

Maax

Hi all, i have a form that has to be part filled in by one department and
then completed by another. I have a button on the form so that once the first
section is filled in the button is pressed and an email is sent to a
pre-defined person with the record details attached (from a report). In the
past i thought i had this working correctly. But now i have realised that
when i click the email button it is only sending the very first record (i.e
record number 1) and not the record which i am currently filling in?

this is what i have attached to the on-click properties of my button,

Private Sub EmailReport1_Click()
On Error GoTo Err_EmailReport1_Click

Dim stDocName As String

stDocName = "Tabbed Data Entry Report"
DoCmd.SendObject acReport, stDocName, html,
"(e-mail address removed)", "(e-mail address removed)"

Exit_EmailReport1_Click:
Exit Sub

Err_EmailReport1_Click:
MsgBox Err.Description
Resume Exit_EmailReport1_Click

End Sub

To be honest i would like to create a new report called "newpart" and have
this emailed from within the form that is being filled in.

as usual your help is greatly appreciated.
 

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