1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| Option Compare Database
Option Explicit
Private Sub BtnTrackerPrint_Click()
Dim criteria As String
If Not IsNull(Me.CmbStatus) Then
criteria = "Opportunities.[Status] = " & Me.CmbStatus
End If
If Not IsNull(Me.CmbPublic_or_Private) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Opportunities.[Public or Private] = " & CmbPublic_or_Private
End If
If Not IsNull(Me.CmbDeal_Categorization) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Opportunities.[Deal Categorization] = " & CmbDeal_Categorization
End If
If Not IsNull(Me.CmbLead) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Opportunities.[Lead] = " & CmbLead
End If
If Not IsNull(Me.CmbTeam) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Opportunities.[Team] = " & CmbTeam
End If
If Not IsNull(Me.CmbBUQuery) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Products.[Business Unit] = " & CmbBUQuery
End If
If Not IsNull(Me.CmbPatient_Population_Type) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Products.[Patient Population Type] = " & CmbPatient_Population_Type
End If
If Not IsNull(Me.CmbEstimate_Number_of_Patient_World_Wide) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Products.[Estimate Number of Patient World Wide] = " & CmbEstimate_Number_of_Patient_World_Wide
End If
If Not IsNull(Me.CmbProductStage) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Products.[Key Indication Stage] = " & CmbProductStage
End If
If Not IsNull(Me.CmbProductGeographyQuery) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Products.[Product Geography] = " & CmbProductGeographyQuery
End If
If Not IsNull(Me.CmbSource_of_Deal) Then
criteria = IIf(IsNull(criteria, "", " AND ")) & "Products.[Source of Deal] = " & CmbSource_of_Deal
End If
DoCmd.OpenReport "All Tracker Report", , , "Status = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "[Public or Private] = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "[Deal Categorization] = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "Lead = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "Team = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "[Business Unit] = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "[Patient Population Type] = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "[Estimate Number of Patient World Wide] = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "[Key Indication Stage] = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "[Product Geography] = " & criteria
DoCmd.OpenReport "All Tracker Report", , , "[Source of Deal] = " & criteria
End Sub |
Partager