The following is an SQL statement I have created in a query and copied into VBA. I have tried to follow the syntax shown in the Access Help but I keep getting syntax errors. Can anyone please tell me what I am doing wrong?
Code:
DoCmd.RunSQL "INSERT INTO Customers ( Advisor, ClientID, C1surname, C1firstname, C2Surname, C2firstname, stNo, StName, Locality, postcode ) IN 'C:\New Software Development\Master Achiever Program\PA Activity\PA Setting Up\PRDBinterface\proreport1.mdb'"
"SELECT [Client action].advisors, [Client action].ClientNo, [Client action].Client1Name1, [Client action].Client1Name2, [Client action].Client2Name1, [Client action].Client2Name2, [Client action].StreetNo, [Client action].StreetName, [Client action].Locality, [Client action].Postcode"
"FROM [Client action]"
"WHERE ((([Client action].ClientNo)=[forms]![client action amended]![clientNo]));"
Last edited: