I have copied code from M$ pages where the line continuation character ( _ ) was used, only to have it fail and I could not figure out the problem - so I never use it. I use this appraoch
Code:
Dim strSql As String
strSql = "INSERT INTO FL (FLDatum, FLJAHR, FLBUART, FLBELEGNR, FLText, FLKONR, FLKTO, "
strSql = strSql & "FLKUC, FLGKb, FLGKn, FLKb, FLKn, FLGKKTO, FLGKONR, FLPeriode) "
strSql = strSql & "SELECT [Abfrage MI-VS-Summe].FJDatum, [Abfrage MI-VS-Summe].FJJahr, "
strSql = strSql & "[Abfrage MI-VS-Summe].FJBUART, [Abfrage MI-VS-Summe].FJBelegNr, "
strSql = strSql & "[Abfrage MI-VS-Summe].FJText, [Abfrage MI-VS-Summe].FJONR, [Abfrage MI-VS-Summe].FJKTO, "
strSql = strSql & "[Abfrage MI-VS-Summe].FJUC, [Abfrage MI-VS-Summe].SummevonFJHB, "
strSql = strSql & "[Abfrage MI-VS-Summe].SummevonFJHB, [Abfrage MI-VS-Summe].SummevonFJsb, "
strSql = strSql & "[Abfrage MI-VS-Summe].SummevonFJsb, [Abfrage MI-VS-Summe].FJGKKTO, "
strSql = strSql & "[Abfrage MI-VS-Summe].FJGKONR, [Abfrage MI-VS-Summe].fjperiode "
strSql = strSql & "FROM [Abfrage MI-VS-Summe];"
I put my spaces at the end of the line, some prefer the start. Key is to adopt one approach and stick with it. As you can see, I also create the variable(s) that will contain the string. I usually use the Execute method of the CurrentDb object to execute the sql. You didn't ask how to run the sql so I don't know if you got that figured out.