I have used a version of the following piece of code several times to export some data into a subsiduary database and it works fine. I changed it to the following and I keep receiving SYNTAX errors. I have been over it with a fine tooth comb and can't see where the problem lies. The only suspicion I have is that the other times I was using it it was from a table on one DB to a table on the other. In this case I am trying to go from a query to a table. Maybe this is not possible (which I hope is not the case).
Maybe some sharp eyed expert out there can spot the problem.
Thanks in advance
Maybe some sharp eyed expert out there can spot the problem.
Thanks in advance
Code:
strsql = "INSERT INTO income (ClientID, wages&salary, " & _
" bus&otherincome, rent&investincome)" & _
" " & _
"IN '" & ServerPath & "' " & _
"SELECT Clientid, wages&salary, bus&otherincome, rent&investincome " & _
"FROM [IncomeTbl Query]" & _
"WHERE [IncomeTbl Query].planid = " & [Forms]![customers]![PlanID] & ";"