I am using access to insert records into quickbooks using qodbc. I have a VBA DoCmd.RunSQL to insert an InvoiceLine using a statement I build dynamically. I have a MsgBox that reports the statement right before calling DoCmd.RunSQL and it says this:
Insert Into "InvoiceLine" ("CustomerRefFullName", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "FQSaveToCache") VALUES ('Casa Grande Condominium', '80000001-1354637734', 'Charge for unit #207-834207-002000009H001', 150, 1, 0)
When I copy the statement verbatim (using ctrl-c on the MsgBox) and paste it into a query it executes just fine. What is the deal here? I am new to access and vb in general.
When I execute the code i receive a "Syntax error in query. Incomplete query clause." error.
Insert Into "InvoiceLine" ("CustomerRefFullName", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "FQSaveToCache") VALUES ('Casa Grande Condominium', '80000001-1354637734', 'Charge for unit #207-834207-002000009H001', 150, 1, 0)
When I copy the statement verbatim (using ctrl-c on the MsgBox) and paste it into a query it executes just fine. What is the deal here? I am new to access and vb in general.
When I execute the code i receive a "Syntax error in query. Incomplete query clause." error.
Last edited: