SQL Problem

N

nick

Hi there, I'm trying to execute a SQL Statement in VB. I get told there's a
syntax error. But I can't really seen anything wrong with it. Is there
something special I need to do to do this in VB? All values except the one
are numbers.


DoCmd.RunSQL ("INSERT INTO Salary (Employee_ID, Base_Amt, Site_Allowance,
Deductions," & _
" Overtime_1, Overtime_2, Overtime_3, Bonus, Labour_Ins,
Income_Tax, Transportation," & _
" Incurred_Expenses, Credit_Rent, Other_Deductions,
Deductions_Reason, Tax_Refund)" & _
" Values (" & Employee_ID & _
", " & Base_Salary & _
", " & Site_Allowance & _
", " & Deductions & _
", " & Overtime_One & _
", " & Overtime_Two & _
", " & Overtime_Three & _
", " & Bonus & _
", " & Labour_Insurance & _
", " & Income_Tax & _
", " & Transportation & _
", " & Incurred_Expenses & _
", " & Credit_Rent & _
", " & Other_Deductions & _
", " & Chr$(34) & Deductions_Reasons & Chr$(34) & _
", " & Tax_Refund & ")")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Inserting a date 3

Top