A
Ann
I found a few different ways of doing an Insert Into on the site. Some with
double quotes and some with single quotes but this is the only one I could
get to work. But it only works if everything is on one line. I have about
30 fields to insert which is just too many. I tried to break them up but I'm
not a programmer and everything I try doesn't work. I get an "expected end
of statement" error. Can someone please show me how to break a line of code?
I've tried different things but just can't get it right. Thanks for the
help. Here is the code:
Dim SQL As String
SQL = "INSERT INTO tblBackupAllFinal (Deal, Provider, TIN, Impact,
FinalDeal, ReceivedDt)" & _
"VALUES ('" & Me!Deal & "', '" & Me!Provider & "', '" & Me!TIN & "', '" &
Me!Impact & "', '" & Me!FinalDeal & "', '" & Me!ReceivedDt & "')"
DoCmd.RunSQL SQL
double quotes and some with single quotes but this is the only one I could
get to work. But it only works if everything is on one line. I have about
30 fields to insert which is just too many. I tried to break them up but I'm
not a programmer and everything I try doesn't work. I get an "expected end
of statement" error. Can someone please show me how to break a line of code?
I've tried different things but just can't get it right. Thanks for the
help. Here is the code:
Dim SQL As String
SQL = "INSERT INTO tblBackupAllFinal (Deal, Provider, TIN, Impact,
FinalDeal, ReceivedDt)" & _
"VALUES ('" & Me!Deal & "', '" & Me!Provider & "', '" & Me!TIN & "', '" &
Me!Impact & "', '" & Me!FinalDeal & "', '" & Me!ReceivedDt & "')"
DoCmd.RunSQL SQL