downhilljon
Registered User.
- Local time
- Tomorrow, 04:47
- Joined
- Jun 14, 2007
- Messages
- 31
Hi there,
I'm hoping someone can help me solve this one.
My append code pops up with a runtime error (3067) when it gets to the DoCmd.RunSQL line. Here is the code:
I copied, pasted and modified from an existing append SQL statement, so I'm fairly certain the structure is correct, probably just missing something small and silly!
I have also tried creating the append query and copying and pasting in the resulting SQL statement Access generates, and that gave me a different problem, so I'll just concentrate on this for now.
Any help is appreciated!
Cheers
I'm hoping someone can help me solve this one.
My append code pops up with a runtime error (3067) when it gets to the DoCmd.RunSQL line. Here is the code:
Code:
strSQL1 = "INSERT INTO [tblCustomers] ( FirstName, Surname, Address, Suburb, State, PostCode, WorkPhone, MobilePhone )" & _
"SELECT '" & strFirstName & "' AS FirstName, '" & strSurname & "' AS Surname, '" & _
strAddress & "' AS Address, '" & strSuburb & "' AS Suburb, '" & _
strState & "' AS State, '" & strPostCode & "' AS PostCode, '" & _
strWorkPhone & "' AS WorkPhone, '" & strMobilePhone & "' AS Mobile Phone;"
DoCmd.RunSQL strSQL1
I copied, pasted and modified from an existing append SQL statement, so I'm fairly certain the structure is correct, probably just missing something small and silly!
I have also tried creating the append query and copying and pasting in the resulting SQL statement Access generates, and that gave me a different problem, so I'll just concentrate on this for now.
Any help is appreciated!
Cheers