When I click on the send attachment button for email or folder, you can see the PDF is attached with the group title but no data is showing so i'm missing something but can't figure out what:
Private Sub CmdSendSave_Click()
On Error GoTo ErrTrap
Dim Rep As String
Dim Qst As String, AddressString As String
Dim rst As DAO.Recordset
' Get name of selected report
Rep = Nz(Me.LstReports, "")
' Get concatenated string covering all
' selected mail addresses
Qst = "SELECT MailAddress FROM " & _
"T_MailAddresses WHERE SendMark = True"
AddressString = ""
Set rst = CurrentDb.OpenRecordset(Qst)
If Not rst.EOF Then
Do Until rst.EOF
AddressString = AddressString & ";" & rst.Fields(0)
rst.MoveNext
Loop
' Get rid of leading semicolon
AddressString = Mid(AddressString, 2)
End If
If Len(Rep) > 0 Then
SendReportPartsByGrpLevel Rep, AddressString
Else
MsgBox "No report selected"
End If
ExitPoint:
On Error Resume Next
rst.Close
Set rst = Nothing
On Error GoTo 0
Exit Sub
ErrTrap:
MsgBox Err.Number & " - " & Err.Description
Resume ExitPoint
End Sub
Private Sub CmdSendSave_Click()
On Error GoTo ErrTrap
Dim Rep As String
Dim Qst As String, AddressString As String
Dim rst As DAO.Recordset
' Get name of selected report
Rep = Nz(Me.LstReports, "")
' Get concatenated string covering all
' selected mail addresses
Qst = "SELECT MailAddress FROM " & _
"T_MailAddresses WHERE SendMark = True"
AddressString = ""
Set rst = CurrentDb.OpenRecordset(Qst)
If Not rst.EOF Then
Do Until rst.EOF
AddressString = AddressString & ";" & rst.Fields(0)
rst.MoveNext
Loop
' Get rid of leading semicolon
AddressString = Mid(AddressString, 2)
End If
If Len(Rep) > 0 Then
SendReportPartsByGrpLevel Rep, AddressString
Else
MsgBox "No report selected"
End If
ExitPoint:
On Error Resume Next
rst.Close
Set rst = Nothing
On Error GoTo 0
Exit Sub
ErrTrap:
MsgBox Err.Number & " - " & Err.Description
Resume ExitPoint
End Sub