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

    NEW sql update HELP :( (time field problem)

    dim update as string
    update = "Update borrowedbooks Set Fine = '" & Me!Text39 & "' Where Title = '" & Me!Title & "' And Dateborrowed = '" & Me!Dateborrowed & "'"
    CurrentDb.Execute update, dbFailOnError



    i always get data type mismatch in criteria expression...


    I want is to update the borrowedbooks table and set the fine the same as my text39(text) in the current form where the title is the same as the title(text) in my current form AND where the dateborrowed is the same as my dateborrowed(date) in 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,521
    Date/time field values need to surrounded by # rather than '.
    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. Update field in table after update on a subform
    By jpkeller55 in forum Queries
    Replies: 3
    Last Post: 09-30-2010, 08:02 PM
  2. Time Elapsed Problem
    By leejqs in forum Reports
    Replies: 6
    Last Post: 07-16-2009, 07:58 AM
  3. Update a combo box in real time
    By protean_being in forum Forms
    Replies: 0
    Last Post: 05-17-2008, 07:39 AM
  4. Importing new time for header and update report
    By spamvalley in forum Reports
    Replies: 2
    Last Post: 02-16-2006, 11:23 AM
  5. Replies: 1
    Last Post: 12-09-2005, 09:16 PM

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