Results 1 to 2 of 2
  1. #1
    speterson is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Sep 2014
    Posts
    1

    Run-time error '3144': Syntax error in UPDATE Statement

    I am having a problem with a Macro that has been working up to this point. I am receiving the following message:

    Run-time error '3144': Syntax error in UPDATE statement

    This is the information that shows when I select Debug with CurrentDb.Execute strSQL highlighted in yellow:

    strSQL = "UPDATE WeeklySummary SET "

    For x = 1 To NumFields
    strSQL = strSQL & "WeeklySummary." & Fields(x - 1) & " = " & rs.Fields(x - 1).Value

    If x <> NumFields Then
    strSQL = strSQL & ", "
    End If
    Next x

    strSQL = strSQL & " WHERE (((WeeklySummary.WeekEnding)=" & strDate & "));"

    CurrentDb.Execute strSQL

    EndSub:

    End Sub


    __________________________________________________ _________________________________________

    Sub LoadFromExcel()

    End Sub

    I am new to this forum and fairly new to Access so any and all help would be greatly appreciated. Thank you.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    When the code breaks, what is the value in the variable strDate
    Maybe you need:
    strSQL = strSQL & " WHERE (((WeeklySummary.WeekEnding)=#" & strDate & "#));"
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Run time error 3144 Syntax error
    By gaker10 in forum Programming
    Replies: 13
    Last Post: 09-02-2014, 11:01 AM
  2. Error 3144: Syntax error in UPDATE statement??
    By Paintballlovr in forum Programming
    Replies: 7
    Last Post: 03-26-2014, 12:53 PM
  3. Syntax Error 3144 in SQL Update Query.
    By Phred in forum Programming
    Replies: 4
    Last Post: 03-02-2012, 02:39 PM
  4. Syntax error in UPDATE statement HELP!
    By asmith78 in forum SQL Server
    Replies: 5
    Last Post: 09-07-2011, 05:50 PM
  5. Run Time Error 3144 for UPDATE
    By KrenzyRyan in forum Programming
    Replies: 12
    Last Post: 05-20-2011, 10:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums