Results 1 to 6 of 6
  1. #1
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22

    Yes/No True/False

    I have an Update SQL statement that I'm getting an error on.
    DoCmd.SetWarnings False
    UpSQL = "UPDATE tblTerminal SET tblTerminal.TerminalName = " & Chr(34) & Forms!frmBSTerminalNames!TxtStation & Chr(34) & ", " & _
    "tblTerminal.TerminalActive = Forms!frmBSTerminalNames!ChkLocked, " & _
    "tblTerminal.TerminalLocation = Forms!frmBSTerminalNames!TxtLocal, " & _
    "tblTerminal.TerminalAddress = Forms!frmBSTerminalNames!TxtIP, " & _


    "tblTerminal.TerminalTypeID = Forms!frmBSTerminalNames!TxtType, " & _
    "tblTerminal.TerminalTouch = Forms!frmBSTerminalNames!ChkTouch " & _
    "WHERE tblTerminal.TerminalID = Forms!frmBSTerminalNames!TxtID;"
    DoCmd.RunSQL (UpSQL)
    DoCmd.SetWarnings True

    Its TerminalActive, it gets its value from a checkbox which is either 0 or -1 The field value in the table is set to Yes/No.....Is this wrong or is the SQL statement wrong. Thanks
    DS

  2. #2
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22

    Error 3113

    Tis is the error message that I'm getting.......



    Cannot update <field name>; field not updatable. (Error 3113)

    Possible causes:

    • The specified field is part of a TableDef or dynaset-type Recordset object that cannot be updated. For example, this error occurs if you try to update an AutoNumber field.
    • You executed a query that combines updatable and nonupdatable TableDef objects, and you tried to update one of the fields in the query's results (the resulting dynaset-type Recordset).

  3. #3
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    I'm assuming that you removed the line:

    "tblTerminal.TerminalActive = Forms!frmBSTerminalNames!ChkLocked, " & _

    and it then worked?

  4. #4
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22
    Yes I did remove it. Funny thing is that the line....

    "tblTerminal.TerminalTouch = Forms!frmBSTerminalNames!ChkTouch " & _

    has the same type of data

    Thanks
    DS

  5. #5
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22
    I found the solution. The field in the query did not exsist. I forgot that two years ago I changed the name. Microsoft help should have said that the field doesn't exsisit instead of all of the other mumbo jumbo. That would have made it a lot easier to find the solution. Thank you for your input.
    DS

  6. #6
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Microsoft errors have always been vague since some of the same errors are used to indicate other problems. To their defense, there would probably be a lot more overhead within MSAccess if it had to specify more details on each specific error.

    I've found that MSAccess errors often get confused for the wrong thing - 'Locked by another user' being the biggest one that developers often get confused with this error being due to a locked record versus a problem with the *.ldb file being locked.

    I'm glad you found the problem!

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

Similar Threads

  1. If any of the following are true
    By Steven.Allman in forum Queries
    Replies: 7
    Last Post: 08-30-2010, 06:10 AM
  2. True, "Wahr" and -1 / 0
    By asearle in forum Programming
    Replies: 5
    Last Post: 08-24-2010, 12:09 PM
  3. Tried and true programs no longer run
    By Seckert in forum Access
    Replies: 0
    Last Post: 04-07-2009, 01:45 PM
  4. True or false
    By tleec in forum Queries
    Replies: 1
    Last Post: 02-01-2008, 10:41 AM
  5. Replies: 2
    Last Post: 08-31-2006, 12:19 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