Private Sub cmdAceptar_Click()
Dim FechaReporte As Date
Dim DiaReporteInicio As String
Dim MesReporteInicio As String
Dim AoReporteInicio As String
Dim FechaReporteConvertidaInicio As String
Dim DiaReporteFin As String
Dim MesReporteFin As String
Dim AoReporteFin As String
Dim FechaReporteConvertidaFin As String
Dim Formula_rb As String
Dim strSelFormula As String, strTitle As String
Dim Canal As String

 If DateDiff("d", DTPFInicio.Value, DTPFFin.Value) < 0 Then
        MsgBox "Por favor, un rango de fechas valido!", vbExclamation
        Exit Sub
        DTPFFin.SetFocus
    End If
    Canal = ComboCanal.Text
    With CrystalReport1
        
        .ReportFileName = frmMain.Ap_Hist & "FlujoPax3.rpt"
La formula para la obtencin del reporte
            strSelFormula = "{ado.Canal_venta}='" & Canal & "' AND {ado.Fecha} >= cdate(" & Format$(DTPFInicio.Value, "yyyy,mm,dd") & ")" & _
                         " AND {ado.Fecha} <= cdate(" & Format$(DTPFFin.Value, "yyyy,mm,dd") & ")"
            .SelectionFormula = strSelFormula
        .WindowTitle = "Flujo Pax"
        .PageZoom 100
        .Action = 1
        
    End With
    
End Sub
