Remplir et vider une listbox en vb6
katika
Messages postés
61
Statut
Membre
-
gregouz62 Messages postés 129 Statut Membre -
gregouz62 Messages postés 129 Statut Membre -
Bonjour,
dans ce code je remplie une liste a partir d'un choix dans d'un combobox mais mon probleme que a chaque fois je change d'item les valeur de la liste restent les memes
Private Sub combobox_AfterUpdate()
If combobox.ListIndex = 0 Then
Me.Liste7.RowSource = "select * from Archive where Nature_C='Prestation' "
Me.Liste7 = Me.Liste7.ItemData(0)
End If
If combobox.ListIndex = 1 Then
Me.Liste7.RowSource = "select * from Archive where Nature_C='Maintenance' and Type_C='Logiciel' "
Me.Liste7 = Me.Liste7.ItemData(0)
End If
end sub
merci
dans ce code je remplie une liste a partir d'un choix dans d'un combobox mais mon probleme que a chaque fois je change d'item les valeur de la liste restent les memes
Private Sub combobox_AfterUpdate()
If combobox.ListIndex = 0 Then
Me.Liste7.RowSource = "select * from Archive where Nature_C='Prestation' "
Me.Liste7 = Me.Liste7.ItemData(0)
End If
If combobox.ListIndex = 1 Then
Me.Liste7.RowSource = "select * from Archive where Nature_C='Maintenance' and Type_C='Logiciel' "
Me.Liste7 = Me.Liste7.ItemData(0)
End If
end sub
merci
Configuration: Windows Vista Internet Explorer 7.0