D
dchristo
I am trying to email a report.
On my form I have a button that the user will click - this will send a
report based on the record shown on the form.
Private Sub Sheet1_Click()
Dim strMessage As String 'Body of message
Dim strSubject As String 'Email Subject
Dim strTo As String 'To address
Dim strCC As String 'CC Address
Dim strBCC As String 'BCC Address
Dim stDocName As String
Dim strWhere As String
strWhere = "[id number] = " & Me.[id Number]
stDocName = "Info Form"
strTo = "(e-mail address removed)"
strCC = ""
strBCC = ""
strSubject = "New request placed - " & Me.[id Number]
strMessage = "If you have any questions, please me at the above email
address."
DoCmd.SendObject acReport, stDocName, acFormatSNP, strTo, , ,
strSubject, strMessage, False
However, it is emailing every single record in the database, how do I send
just the current record that is showing on the form?
On my form I have a button that the user will click - this will send a
report based on the record shown on the form.
Private Sub Sheet1_Click()
Dim strMessage As String 'Body of message
Dim strSubject As String 'Email Subject
Dim strTo As String 'To address
Dim strCC As String 'CC Address
Dim strBCC As String 'BCC Address
Dim stDocName As String
Dim strWhere As String
strWhere = "[id number] = " & Me.[id Number]
stDocName = "Info Form"
strTo = "(e-mail address removed)"
strCC = ""
strBCC = ""
strSubject = "New request placed - " & Me.[id Number]
strMessage = "If you have any questions, please me at the above email
address."
DoCmd.SendObject acReport, stDocName, acFormatSNP, strTo, , ,
strSubject, strMessage, False
However, it is emailing every single record in the database, how do I send
just the current record that is showing on the form?