Results 1 to 2 of 2
  1. #1
    ducthang88 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    12

    sql UPDATE syntax help

    Dim strSQL As String
    strSQL = "Update books Set AvailableCopies = ' & Me.Text46 & ' Where Title = ' & Me.Title & '"
    CurrentDb.Execute strSQL, dbFailOnError




    please tweak my shitty code...

    update to table books then set the AvailableCopies field the same as the Text46 in my form now Where Title field is the same on the the title field on my form...

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Presuming the first is numeric and the second is text:

    Code:
    strSQL = "Update books Set AvailableCopies = " & Me.Text46 & " Where Title = '" & Me.Title & "'"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Incomplete Syntax Clause (syntax error)
    By ajetrumpet in forum Programming
    Replies: 4
    Last Post: 09-11-2010, 10:47 AM
  2. Please help SQL Syntax
    By jordanturner in forum Access
    Replies: 4
    Last Post: 09-02-2010, 08:05 AM
  3. UPDATE query syntax
    By jgelpi16 in forum Programming
    Replies: 10
    Last Post: 08-21-2010, 07:40 PM
  4. Syntax For After Update Event
    By MuskokaMad in forum Forms
    Replies: 14
    Last Post: 03-12-2010, 01:48 PM
  5. Sql Syntax Query
    By Matthieu in forum Queries
    Replies: 4
    Last Post: 12-30-2009, 09:41 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