Thankes.. Sandra .. and John.
John it was just a typo in my examle there =)
i´ve sett it upp like this now..
if i use .. " " & _ og " " _ > & i get.. " To many line forwards.. error
"
But now i still get this.. Syntax Error..
could you look at this code..
i guess it scramles upp here .. so
it´s here.. to ..
view in notepad. with no word wrap
http://www.steinki.net/code.zip
And it´s also here.
'## BEGIN ##
Dim strSQL As String
strSQL = _
"INSERT INTO StoredReports (clientID, name, address, by, carnr, carname,
job1, job2, job3, job4, job5, job6, job7, job8, job9, job10, job11, job12,
job13, job14, job15, job16, job17, job18, job19, job20, job21, job22,
antal1, antal2, antal3, antal4, antal5, antal6, antal7, antal8, antal9,
antal10, antal11, antal12, antal13, antal14, antal15, antal16, antal17,
antal18, antal19, antal20, antal21, antal22, PrisPAntal1, PrisPAntal2,
PrisPAntal3, PrisPAntal4, PrisPAntal5, PrisPAntal6, PrisPAntal7,
PrisPAntal8, PrisPAntal9, PrisPAntal10, PrisPAntal11, PrisPAntal12,
PrisPAntal13, PrisPAntal14, PrisPAntal15, PrisPAntal16, PrisPAntal17,
PrisPAntal18, PrisPAntal19, PrisPAntal20, PrisPAntal21, PrisPAntal22, sum1,
sum2, sum3, sum4, sum5, sum6, sum7, sum8, sum9, sum10, sum11, sum12, sum13,
sum14, sum15, sum16, sum17, sum18, sum19, sum20, sum21, sum22, beskriv,
fragt, moms, prisUmoms, prisMmoms)" & _
"VALUES(" _
& """" & Me!ClientID & """,""" & Me!name & """,""" & Me!Address & ""","""
& Me!by & """,""" & Me!carnr & """, """ & Me!carname & """, " _
& """" & Me!Job1 & """,""" & Me!Job2 & """,""" & Me!Job3 & """,""" &
Me!Job4 & """,""" & Me!Job5 & """,""" & Me!Job6 & """,""" & Me!Job7 &
""",""" & Me!Job8 & """,""" & Me!Job9 & """,""" & Me!Job10 & """,""" &
Me!Job12 & """,""" & Me!Job13 & """,""" & Me!Job14 & """,""" & Me!job15 &
""",""" & Me!Job16 & """,""" & Me!Job17 & """,""" & Me!Job18 & """,""" &
Me!Job19 & """,""" & Me!Job20 & """,""" & Me!Job21 & """,""" & Me!Job22 &
""", " _
& """" & Me!Antal1 & """,""" & Me!Antal2 & """,""" & Me!Antal3 & ""","""
& Me!Antal4 & """,""" & Me!Antal5 & """,""" & Me!Antal6 & """,""" &
Me!Antal7 & """,""" & Me!Antal8 & """,""" & Me!Antal9 & """,""" & Me!Antal10
& """,""" & Me!Antal11 & """,""" & Me!Antal12 & """,""" & Me!Antal13 &
""",""" & Me!Antal14 & """,""" & Me!Antal15 & """,""" & Me!Antal16 & ""","""
& Me!Antal17 & """,""" & Me!Antal18 & """,""" & Me!Antal19 & """,""" &
Me!Antal20 & """,""" & Me!Antal21 & """,""" & Me!Antal22 & """," _
& """" & Me!PrisPAntal1 & """,""" & Me!PrisPAntal2 & """,""" &
Me!PrisPAntal3 & """,""" & Me!PrisPAntal4 & """,""" & Me!PrisPAntal5 &
""",""" & Me!PrisPAntal6 & """,""" & Me!PrisPAntal7 & """,""" &
Me!PrisPAntal8 & """,""" & Me!PrisPAntal9 & """,""" & Me!PrisPAntal10 &
""",""" & Me!PrisPAntal11 & """,""" & Me!PrisPAntal12 & """,""" &
Me!PrisPAntal13 & """,""" & Me!PrisPAntal14 & """,""" & Me!PrisPAntal15 &
""",""" & Me!PrisPAntal16 & """,""" & Me!PrisPAntal17 & """,""" &
Me!PrisPAntal18 & """,""" & Me!PrisPAntal19 & """,""" & Me!PrisPAntal20 &
""",""" & Me!PrisPAntal21 & """,""" & Me!PrisPAntal22 & """," _
& """" & Me!sum1 & """,""" & Me!sum2 & """,""" & Me!sum3 & """,""" &
Me!sum4 & """,""" & Me!sum5 & """,""" & Me!sum6 & """,""" & Me!sum7 &
""",""" & Me!sum8 & """,""" & Me!sum9 & """,""" & Me!sum10 & """,""" &
Me!sum11 & """,""" & Me!sum12 & """,""" & Me!sum13 & """,""" & Me!sum14 &
""",""" & Me!sum15 & """,""" & Me!sum16 & """,""" & Me!sum17 & """,""" &
Me!sum18 & """,""" & Me!sum19 & """,""" & Me!sum20 & """,""" & Me!sum21 &
""",""" & Me!sum22 & """,""" & Me!Beskriv & """,""" & Me!fragt & """,""" &
Me!moms & """,""" & Me!PrisUmoms & """,""" & Me!PrisMmoms & """)"
CurrentDb.Execute strSQL, dbFailOnError
'### END ###
Then a report opens with info from here and there not that it has anything
to do with this. =)
I hope you see the error here if you show you the whole code i´m trying to
use, not just those examples.