voila

j'ai des textbox avec lesquelles je remplis un tableau tabF

je change le chiffre et dans ma table SQL il me le met à -1

je pensais que c'était un probleme de format et qu'il fallait trnasformer le string en integer
soit
q = Ctype(tabF(i, 2),Integer)
ou
q = Integer.parse(tabF(i, 2))

et aux 2 il me met
Attendu expression
sur "Integer"


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
Public Function updateFacture(idFacture As Integer)
 
Dim i As Integer
Dim j As Integer
Dim idop As Integer
Dim q As Integer
Dim t As Integer
 
Dim rs As Recordset
 
For i = 1 To 8
 
Set rs = base.OpenRecordset("select id from opeAff where operation='" & tabF(i, 1) & "';")
idop = rs.Fields(0)
Debug.Print tabF(i, 1) & " " & tabF(i, 2) & "," & tabF(i, 3)
q = tabF(i, 2)
t = tabF(i, 3)
 
base.Execute "UPDATE factAffContient Set quantite=" & q & " and tarif=" & t & " where idFactAff=" & idFacture & "and idopAff=" & idop & ";"
 
Next
End Function