1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| ' Tu as oublier ceci :
Dim C As Integer
'ta requète ( date : #" & A & "#, integer : " & C & ", String : '" & B & "')
sql = "INSERT INTO [T-Historique]([DateInsertion],[Collaborateur],[Type]) values (#" & A & "#, '" & B & "', " & C & ")"
CurrentDb.Execute(sql)
'Fais attention à la date, en général il faut changer son format avec Access.
'Si besoin voici comment faire :
Dim A, date_, date2 As date
A = Date,
date_ = Format(A, "mm/dd/yyyy") 'Format mois/jour/année
date2 = Format(A, "dd/mm/yyyy" 'Format jour/mois/année |
Partager