bonjour,
j'ai un petit soucis sur un de mes formulaire realiser a l aide de vb6 et de access 2003
le probleme est le suivant
j ai un formulaire avec un list box cette fenêtre se nome "frmlstmat"
dans cette fenetre se trouve tous mes articles.
voici son code
le seul champ qui se remplie est "txtmp.text" pour le reste j'ai come erreur 3021 pas d'enregistrement je ne comprend pas y a t il quel qu'un qui pourrai m'aider. je suis en galère
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 Dim db As Database Dim rs As Recordset Dim strPointermat As String Set db = OpenDatabase(App.Path & "\facture.mdb") strPointermat = "Select catmateriel, nommat, prixvtemat, descriptif From materiels Where catmateriel = '" & Numater(List1.ListIndex) & "'" Set rs = db.OpenRecordset(strPointermat, dbOpenSnapshot) Frmfacture.txtmp.Text = Numater(List1.ListIndex) Frmfacture.txtfacrefmat.Text = rs("prixvtemat") 'Frmfacture.cmdfacprenomclt.Text = rs("prenomclt") rs.Close db.Close Unload Me End Sub
merci d'avance pour tout.
Partager