Question : SQL Insert INTO script syntax error

I have an SQL script that I keep getting a syntax error when I try and run. Can anyone see an obvious problems.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
mySQL = ("INSERT INTO [SHARE REGISTER] (CompanyID, InvestorID, CompanyName, " & _
            "InvestorName, BidPrice, OfferPrice, NoShares, " & _
            "Agent, AgentFee, RedemptionCharge, TransactionType, " & _
            "Consideration, ReceivedDate, ReceivedTime, ReceivedBy, " & _
            "CDDComplete, CashUnit, AgentFeeAmount, NetConsideration, Notes, TransactionDate, " & _
            "ModifiedBy, ModifiedDateTime, VerifiedBy, VerifiedDateTime, TransactionID) " & _
            "VALUES " & [Forms]![Dealing Input]!CompanyID & "," & [Forms]![Dealing Input]!InvestorID & "," & _
            "" & [Forms]![Dealing Input]!FundCombo & "," & [Forms]![Dealing Input]!InvestorName & "," & _
            "" & [Forms]![Dealing Input]!BidPrice & "," & [Forms]![Dealing Input]!OfferPrice & "," & _
            "" & [Forms]![Dealing Input]!NoShares & "," & [Forms]![Dealing Input]!Agent & "," & _
            "" & [Forms]![Dealing Input]!AgentFee & "," & [Forms]![Dealing Input]!RedemptionCharge & "," & _
            "" & [Forms]![Dealing Input]!TransactionType & "," & [Forms]![Dealing Input]!Consideration & "," & _
            "" & [Forms]![Dealing Input]!ReceivedBy & "," & [Forms]![Dealing Input]!ReceivedDate & "," & _
            "" & [Forms]![Dealing Input]!ReceivedTime & "," & [Forms]![Dealing Input]!CDDComplete & "," & _
            "" & [Forms]![Dealing Input]!WorldCheck & "," & [Forms]![Dealing Input]!CashUnit & "," & _
            "" & [Forms]![Dealing Input]!AgentFeeAmount & "," & [Forms]![Dealing Input]!NetConsideration & "," & _
            "" & [Forms]![Dealing Input]!Notes & "," & [Forms]![Dealing Input]!TransactionDate & "," & _
            "" & [Forms]![Dealing Input]!UserID & "," & [Forms]![Dealing Input]!ModifiedDateTime & "," & _
            "" & [Forms]![Dealing Input]!RecordID & "")

Answer : SQL Insert INTO script syntax error

mySQL = ("INSERT INTO [SHARE REGISTER] (CompanyID, InvestorID, CompanyName) " & _
            "VALUES ('" & [Forms]![Dealing Input]!CompanyID & "', '" & [Forms]![Dealing Input]!InvestorID & "', '" & [Forms]![Dealing Input]!FundCombo & "'")

You were missing an opening parenthesis

 Here's a working syntax

        sSql = "Insert into " & eTable & " (log_date, app, msg, type, lvl)"
        sSql = sSql & " Values (#" & Now & "#, '" & sApp & "', '" & sMsg & "','" & sType & "', " & iLVL & ");"

J
Random Solutions  
 
programming4us programming4us