E-mail One Form Only! (1 Viewer)

PBond77

New member
Local time
Today, 16:22
Joined
Jan 19, 2017
Messages
1
Good Afternoon.

New member here, hello. Looking for a bit of assistance.

Been working on a new database, whereby I am creating non-conformance records, which are then e-mailed to an appropriate person who has been identified as needing to carry out an action of some description.
I am using the following code:

Private Sub Command1452_Click()
On Error GoTo Err_Command1452_Click

Dim stDocName As String

stDocName = "Quarantine Records"
DoCmd.SendObject acForm, stDocName, acFormatPDF, Me.CorrectiveActionAssignedTo, , , "Corrective Action Required", "You have been assigned a Corrective Action.", True

Exit_Command1452_Click:
Exit Sub

Err_Command1452_Click:
MsgBox Err.Description
Resume Exit_Command1452_Click

End Sub

Works alright, just one problem - it e-mails a pdf of ALL records that I've raised. Can I change this so it only e-mails a pdf of the current record?

Cheers for any assistance.
 

OTWarrior

Registered User.
Local time
Today, 16:22
Joined
Jan 16, 2017
Messages
22
Your form is maybe linked to all your records. Have you got a filter to just display the current record on the form source?

If not, a query or filter may help.
 

Users who are viewing this thread

Top Bottom