I can't figure out what is wrong with my insert statement. I know it is going to be something simple that I am missing. I have just spent too much time trying to resolve.
Here is my code
This is the result of the debug.print
The error I keep getting is "Syntax error in 'Insert Into' statement"
I tried double quotes instead of single quotes, verified spelling, and data types.



Here is my code
Code:
strSQL = "Insert into tbl_ProvExpenses (CID,ETID,Option,StartDate," & _
"POICount,Amount,ATotal,CTotal,Support,SubAccount) " & _
"Values ( 1, " & Me.cmbAccount.Value & ", '" & Me.cmbOption.Value & _
"', #" & Me.txtStartDate.Value & "#, " & Me.txtPeriods.Value & _
", " & Me.txtAmount.Value & ", " & Me.txtAnnualTotal.Value & _
", " & Me.txtCommitTotal.Value & ", '" & Me.cmbSupport.Value & _
"', '" & Me.txtSub.Value & "');"
Debug.Print strSQL
DoCmd.RunSQL strSQL
This is the result of the debug.print
Code:
Insert into tbl_ProvExpenses
(CID,ETID,Option,StartDate,POICount,Amount,ATotal,CTotal,Support,SubAccount)
Values ( 1, 7, 'Lifetime of Commitment Per Year', #9/1/2009#, 3, 10000, 10000, 30604
, 'Section', '01-123-45-678-9');
The error I keep getting is "Syntax error in 'Insert Into' statement"
I tried double quotes instead of single quotes, verified spelling, and data types.


