Revenir à la ligne dans l'éditeur VBA sous Access

Fermé
UnknowVBA - 6 sept. 2016 à 13:53
 Utilisateur anonyme - 8 sept. 2016 à 00:57
Bonjour,

Je souhaite revenir à la ligne lorsque je fais une requête SQL dans l'éditeur mais je n'y arrive pas... Voici les lignes de code :

StrSQL1 = "INSERT INTO ...." & Str(JourFeriee_10) & ", " & Str(JourFeriee_11) & "," & _
"& Str(JourFeriee_12) & ", " & Str(JourFerieeTotalMois3) & "," " & Str(JourAutre1) & ", " & Str(JourAutre2) & ", " & Str(JourAutre3) & ", " & Str(JourAutre4) & ", " & Str(JourAutreTotalMois1) & ", " & Str(JourAutre5) & ", " & Str(JourAutre6) & ", " & Str(JourAutre7) & ", " & Str(JourAutre8) & ", " & Str(JourAutreTotalMois2) & ", " & Str(JourAutre9) & ", " & Str(JourAutre10) & ", " & Str(JourAutre11) & ", " & Str(JourAutre12) & ", " & Str(JourAutreTotalMois3) & ", " & Str(TotalGeneral) & ");"


Le retour à la ligne se fait à ce niveau là mais j'ai des problèmes de guilemets... : " & Str(JourFeriee_11) & "," & _
"& Str(JourFeriee_12) & "

A voir également:

2 réponses

f894009 Messages postés 17185 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 15 avril 2024 1 702
7 sept. 2016 à 08:23
Bonjour,

retour a la ligne ok, mais la structure n'est pas bonne
StrSQL1 = "INSERT INTO ...." & Str(JourFeriee_10) & ", " & Str(JourFeriee_11) & "," & _
                    Str(JourFeriee_12) & ", " & Str(JourFerieeTotalMois3) & "," & _
                    Str(JourAutre1) & ", " & Str(JourAutre2) & ", " & Str(JourAutre3) & ", " & _
                    Str(JourAutre4) & ", " & Str(JourAutreTotalMois1) & ", " & Str(JourAutre5) & ", " & _
                    Str(JourAutre6) & ", " & Str(JourAutre7) & ", " & Str(JourAutre8) & ", " & _
                    Str(JourAutreTotalMois2) & ", " & Str(JourAutre9) & ", " & Str(JourAutre10) & ", " & _
                    Str(JourAutre11) & ", " & Str(JourAutre12) & ", " & Str(JourAutreTotalMois3) & ", " & Str(TotalGeneral) & ");"


regardez ceci:
requete insert into
https://sql.sh/cours/insert-into
0
Bonjour,

moi ces & _ j'en suis allergique...

Voici ce que je fais, et c'est bien + lisible

StrSQL1 = "INSERT INTO ...."
StrSQL1 StrSQL1 & 'Str(JourFeriee_10)' & " " &
StrSQL1=StrSQL1 & Str(JourFeriee_11)

etc...

A+
Quand Jimmy dit What'd I say 
I love you baby 
C'est comme qui dirait 
Toute la province qui chante en anglais
0