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
| Private Sub Dcbobjet_Change(Index As Integer)
Select Case Index
Case 3
Dcbobjet(4).Visible = True
Set adoliste = New ADODB.Recordset
resultat = "select * from chrono WHERE period LIKE '" & Dcbobjet(3).Text & "' "
adoliste.Open resultat, adoConnection, adOpenDynamic, adLockOptimistic, adCmdText
Set Dcbobjet(4).DataSource = adoliste
Set Dcbobjet(4).RowSource = adoliste
Dcbobjet(4).DataField = "EPOQUE"
Dcbobjet(4).ListField = "EPOQUE"
Dcbobjet(4).SetFocus
Case 4
Dcbobjet(5).Visible = True
Set adoliste = New ADODB.Recordset
resultat = "select * from RECAP where PER like '" & Dcbobjet(4).Text & "'"
adoliste.Open resultat, adoConnection, adOpenDynamic, adLockOptimistic, adCmdText
Set Dcbobjet(5).DataSource = adoliste
Set Dcbobjet(5).RowSource = adoliste
Dcbobjet(5).DataField = "NOM"
Dcbobjet(5).ListField = "NOM"
End Select
End Sub |