Bonsoir,
J'ai un prog qui me sert en envoyer des données dans une base access.
Voici mon code
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
Dim MonRs As ADODB.Recordset
Text3.Text = Text1.Text
Adodc1.CommandType = adCmdTable
Adodc1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & App.Path & "\Expertise .accdb"
If Option1.Value = True Then
Adodc1.RecordSource = "Pierres"
'Adodc1.Recordset.EOF
Adodc1.Refresh
Adodc1.Recordset.AddNew
Adodc1.Recordset!N = Form2.txtexp(0)
Adodc1.Recordset!N°Pierre = lblnp.Caption
Adodc1.Recordset!Perle = "0"
Adodc1.Recordset!FormePierre = Text1.Text
Adodc1.Recordset!Couleur = TxtCul.Text
Adodc1.Recordset!Transparence = Combo2.Text
Adodc1.Recordset!Eclat = Text2.Text
Adodc1.Recordset!Arêtes = Combo4.Text
Adodc1.Recordset!Effetsoptiques = Combo5.Text
Adodc1.Recordset!Poids = txtpoids.Text
    If Rtxcul.Text <> "Texte couleur" Then
        Adodc1.Recordset!Textecouleur = Rtxcul.Text
    End If
    If rtxar.Text <> "Texte arêtes" Then
        Adodc1.Recordset!TextAretes = rtxar.Text
    End If
    If Rtxeclat.Text <> "Texte éclat" Then
        Adodc1.Recordset!Texteclat = Rtxeclat.Text
    End If
Adodc1.Recordset.MoveFirst
Adodc1.Refresh
End If
Unload Form3
Ce code me génère l'erreur : "une requete insert into ne peux pas contenir de champs a plusieurs valeur."
Mais champs ne contiennent qu'une valeur