Need to get the below code to email the report when filtered from the combo box selection. Works with printing or viewing the report. Need to get it to email and file.
Any additions or revisions would be appreciative, thanks.
Private Sub Command4_Click()
On Error GoTo MyErr
If IsNull(Me.Combo0) Then
MsgBox "No location selected, a selection must be made to run report", vbCritical, "Selection Required "
If Not IsNull(Me.Combo0) Then
strFilter = "[state]= '" & Me![Combo4] & "'"
strFilter = strFilter & " and [city]= '" & Me![Combo5] & "'"
DoCmd.SendObject acReport, "Myreport", , strFilter
If Err.Number <> 2501 Then