M
Mike Green
Hi All
I keep getting Syntax error on the code shown below. What am I doing wrong?
It's really bugging me now please help!
Dim strSQLAppend As String
Dim strSQLDelete As String
Dim strCaravan As String
Dim strCustomer As String
strCaravan = Me.CaravanID
strCustomer = Me.CustomerID
'Archive the Customer
strSQLAppend = "INSERT INTO Tbl_Customer_Archive (CustomerID,
CustomerTitle, CustomerGName," & _
"CustomerSName, CustomerAddres1, CustomerAddres2, CustomerAddres3,
CustomerTown," & _
"CustomerCounty, CustomerPostal, CustomerEmail, CustomerHPhone,
CustomerWPhone, CusteomerMPhone, CustomerRemarks ) " & _
"SELECT Tbl_Customer.CustomerID" & _
"Tbl_Customer.CustomerTitle," & _
"Tbl_Customer.CustomerGName, " & _
"Tbl_Customer.CustomerSName," & _
"Tbl_Customer.CustomerAddres1," & _
"Tbl_Customer.CustomerAddres2," & _
"Tbl_Customer.CustomerAddres3," & _
"Tbl_Customer.CustomerTown," & _
"Tbl_Customer.CustomerCounty," & _
"Tbl_Customer.CustomerPostal," & _
"Tbl_Customer.CustomerEmail," & _
"Tbl_Customer.CustomerHPhone," & _
"Tbl_Customer.CustomerWPhone," & _
"Tbl_Customer.CusteomerMPhone," & _
"Tbl_Customer.CustomerRemarks," & _
"FROM Tbl_Customer WHERE (Tbl_Customer.CustomerID = strCustomer);"
CurrentDb.Execute strSQLAppend
I have cut the rest of the code as the error is in this part.
Thanks in Advance.
I keep getting Syntax error on the code shown below. What am I doing wrong?
It's really bugging me now please help!
Dim strSQLAppend As String
Dim strSQLDelete As String
Dim strCaravan As String
Dim strCustomer As String
strCaravan = Me.CaravanID
strCustomer = Me.CustomerID
'Archive the Customer
strSQLAppend = "INSERT INTO Tbl_Customer_Archive (CustomerID,
CustomerTitle, CustomerGName," & _
"CustomerSName, CustomerAddres1, CustomerAddres2, CustomerAddres3,
CustomerTown," & _
"CustomerCounty, CustomerPostal, CustomerEmail, CustomerHPhone,
CustomerWPhone, CusteomerMPhone, CustomerRemarks ) " & _
"SELECT Tbl_Customer.CustomerID" & _
"Tbl_Customer.CustomerTitle," & _
"Tbl_Customer.CustomerGName, " & _
"Tbl_Customer.CustomerSName," & _
"Tbl_Customer.CustomerAddres1," & _
"Tbl_Customer.CustomerAddres2," & _
"Tbl_Customer.CustomerAddres3," & _
"Tbl_Customer.CustomerTown," & _
"Tbl_Customer.CustomerCounty," & _
"Tbl_Customer.CustomerPostal," & _
"Tbl_Customer.CustomerEmail," & _
"Tbl_Customer.CustomerHPhone," & _
"Tbl_Customer.CustomerWPhone," & _
"Tbl_Customer.CusteomerMPhone," & _
"Tbl_Customer.CustomerRemarks," & _
"FROM Tbl_Customer WHERE (Tbl_Customer.CustomerID = strCustomer);"
CurrentDb.Execute strSQLAppend
I have cut the rest of the code as the error is in this part.
Thanks in Advance.