Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2003

    Unanswered: strFilter combo box to email and file

    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
    Exit Sub
    If Err.Number <> 2501 Then
    MsgBox Err.Description
    End If
    Resume MyExit
    End If
    End If

    End Sub
    Last edited by comf36; 05-18-04 at 05:11.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts