Ajouter la valeur d'une variable à une table avec Requete VBA INSERT INTO
Bonsoir,
Je tourne en rond !!!
Comment ajouter au champ "Champ_1" de ma table T_TAMPON, la valeur de la variable TITRE ???
MERCI par avance
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Private Sub Commande0_Click()
Dim TITRE As String
If CADRE_SITE = 1 Then
TITRE = "TITRE1"
End If
If CADRE_SITE = 2 Then
TITRE = "TITRE2"
End If
If CADRE_SITE = 3 Then
TITRE = "TITRE3"
End If
If CADRE_SITE = 4 Then
TITRE = "TITRE4"
End If
DoCmd.RunSQL "DELETE * FROM [T_TAMPON];"
CurrentDb.Execute "INSERT INTO T_TAMPON(Champ_1) VALUES ('TITRE')"
End Sub |