Results 1 to 3 of 3
  1. #1
    itm is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    69

    Trying to get a Update statement to work

    Hi,
    This should be simple but for some reason is not working in Access.
    I tryed putting this in a query and VBA as I have below, but I keep getting the error message "Operation must use an updatable query"; but I am not sure why or what to do about it. Any ideas here would really be appreaciated.
    Thank you



    My code:
    Code:
     Set cn = CurrentProject.Connection
    str = "UPDATE tblCom07WorkingNew SET tblCom07WorkingNew.Level3 = (SELECT tblCom07Dump.[Proj def] FROM tblCom07Dump INNER JOIN tblCom07WorkingNew ON tblCom07Dump.PeggedRqmt = tblCom07WorkingNew.Network);"
            cn.Execute str

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    well this is one time the error message tends to be literally correct. it isn't the code syntax. what you need to do is run that target query just a simple standalone select query manually - and note if it is indeed not updateable (you won't be able to change any text in any field)....

    there are lots of Q& A on what defines/creates an updateable query. it is a common issue... this is what you have to solve. No single post in a forum can say do x,y or z....it will depend on your data & structure.

    Sorry not to be more helpful.

  3. #3
    itm is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    69
    Well thanks, I will look into what make an updatable query.

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

Similar Threads

  1. Update Statement in form code
    By ksmith in forum Programming
    Replies: 9
    Last Post: 11-07-2011, 12:04 PM
  2. UPDATE Statement Correct Syntax
    By OMGsh Y did I say Yes in forum Forms
    Replies: 2
    Last Post: 02-23-2011, 01:42 PM
  3. Update Query does not allways work
    By newtoAccess in forum Queries
    Replies: 3
    Last Post: 02-07-2011, 01:13 PM
  4. Replies: 3
    Last Post: 12-20-2010, 09:22 AM
  5. Case or Switch in an update statement
    By allenjasonbrown@gmail.com in forum Queries
    Replies: 7
    Last Post: 11-17-2010, 01:49 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