Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2011
    Posts
    9

    Unanswered: Syntax Error in Insert Into

    Hi,

    I have the following insert into getting the results from a previously run query,

    DoCmd****nSQL "INSERT INTO promise_date_changes([WO#], PRCMPY, [PRORD#], O1LINE, [O1PO#1], Promise, O1YNID, O1TYPE, O1YCLR, O1OQTY, O1AQTY, Ship)VALUES, " & _
    "(rst2![WO#], rst2![PRCMPY], rst2![PRORD#], rst2![O1LINE], rst2![O1PO#1], rst2![Promise], rst2![O1YNID], rst2![O1TYPE], rst2![O1YCLR], rst2![O1OQTY] ,rst2![O1AQTY], rst2![ship])"


    Not sure why this is not working, please advise

  2. #2
    Join Date
    Nov 2011
    Posts
    9
    The **** is not on my page dont know why it showed up

  3. #3
    Join Date
    Nov 2011
    Posts
    9
    The **** is not on my page dont know why it showed up

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    You don't want a comma after values do you?

    Shouldn't it just be

    [code]
    "INSERT INTO promise_date_changes([WO#], PRCMPY, [PRORD#], O1LINE, [O1PO#1], Promise, O1YNID, O1TYPE, O1YCLR, O1OQTY, O1AQTY, Ship) VALUES " & _
    "(rst2![WO#], rst2![PRCMPY], rst2![PRORD#], rst2![O1LINE], rst2![O1PO#1], rst2![Promise], rst2![O1YNID], rst2![O1TYPE], rst2![O1YCLR], rst2![O1OQTY] ,rst2![O1AQTY], rst2![ship])"
    [code]

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •