salut je devellope avec Vb6 j'ai une table Commande qui porte 5 champs
(numAuto, N°Commande(num_cde), Designation(desig_cde), Quantité(qt_cde), Prix unitaire(pu_cde)).
Le client peux effectuer Plusieur Commande alors j'me suis servis du LISTVIEW
pour voir ce que l client a commander ainsi modifier la colonne du quantité (dans listview) si client a changer d'avis et apres faire le Montant total
j'ai fé ce code mais il lui manque le reste
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
Dim base as database
Dim E_command as recordset
Private sub Form1_load()
set Base = openrecordset(App.path & "\gestion commercial.mdb")  'chemin du BDD
set E_command=base.openrecordset("commande") 'ouverture d table commande
with listview1.columnheaders 'Conception l'Entête du Listview
.add="N°Command"
.add="Designation"
.add="Quantité"
.add="Prix unitaire"
.add="Montant"
listview1.view=3
End with 
with E_command   ' l'autoIncrementation sur le champs num_auto
if not .eof then
.moveLast
label5=!num_auto+1
else
label5=1
end if
end with
End sub
 
Private sub cmdAjout_click
aj=msgbox("ajout dans listview",vbyesno")
if aj=6 then
'le Code necessair Pour l'ajout dans listview
End sub
 
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case Is = 1 'Ajout des informations dans la table Commande
va = MsgBox("Voulez-vous Vraiment" & Chr(13) & "valider Ses Informations??", vbYesNo + vbInformation, "Confirmation")
If va = 6 Then
 
SQL = "insert into commande & _
" values( '" & maskedbox1 & "' , '" & text1 & "' , " & text2 & " , " & text3 & ")"
base.Execute SQL
End If
Label5 = Val(Label5) + 1 
 
end select
Remarque:
pour l'ajout dans la table commande Ce code valide uniquement le premier enregistrement du commande dans listview
pourez vous m'aidez svp