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
|
Private Sub chkCrDteRétrib_Click()
'Je fais apparaitre mon combobox si la case est cochée
If Me.chkCrDteRétrib Then
Me.cmbCrDteRétrib.Visible = True
Else
Me.cmbCrDteRétrib.Visible = False
End If
'Je détermine ma requête SQL
Dim SQL As String, SQLWhere As String
SQL = "SELECT Date_Rétribution FROM [Rétributions Crédit] WHERE [Affiché] = True "
If Me.chkCrDteÉm Then
SQL = SQL & "And (Funding_Date_Advance) = [Formulaires]![FrmList]![cmbCrDteÉm] "
End If
If Me.chkCrDteÉc Then
SQL = SQL & "And (Term_Maturity_Date) = [Formulaires]![FrmList]![cmbCrDteÉc] "
End If
If Me.chkCrMC Then
SQL = SQL & "And (Code_Maison_Courtage) = [Formulaires]![FrmList]![cmbCrMC] "
End If
If Me.chkCrRep Then
SQL = SQL & "And (Representative_Code) = [Formulaires]![FrmList]![cmbCrRep] "
End If
If Me.chkCrGuide Then
SQL = SQL & "And (Type de Guide-credit) = [Formulaires]![FrmList]![cmbCrGuide] "
End If
If Me.chkCrNoPret Then
SQL = SQL & "And (Loan_Number) = [Formulaires]![FrmList]![cmbCrNoPret] "
End If
If Me.chkCrMont Then
SQL = SQL & "And (Montant à rémunérer 1) = [Formulaires]![FrmList]![cmbCrMont] "
End If
If Me.chkCrTerm Then
SQL = SQL & "And (Remaining_Term 1) = [Formulaires]![FrmList]![cmbCrTerm] "
End If
SQL = SQL & ";"
'Je détermine la source de contrôle comme étant ma requête SQL
Me.cmbEpDteRétrib.ControlSource = SQL
End Sub |
Partager