Results 1 to 7 of 7
  1. #1
    bcofie is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    31

    Update query with Option Group Value

    UPDATE Table1 SET Table1.BYear = [Forms]![Form1]![FrameB];




    This update query doesnt work. I cant figure out why. Basically I am trying to update a table with the selected value that sits in an frame of option group. Everything thing is unbound--form and frame.
    Any help will be appreciated.

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Does table1 have only 1 record?

  3. #3
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    BTW, when you created the option group did you physically change the control name to FrameB or just the header of the frame that shows up on the form? If you just changed the header, you will have to also change the name of the actual control to FrameB

  4. #4
    bcofie is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    31
    I changed option group name to FrameB. Table1 contains 1Field BYear with no record in it.

  5. #5
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You cannot update a record that does not exist. You either have to add a record manually or change your update query to an append query. An update query only changes existing records, an append query adds new records.

    Even if you do not have a record in the table, Access should still attempt the update but will say that 0 records were updated. Are you seeing that message when you attempt to run the update query?

  6. #6
    bcofie is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    31
    Yes I do see 0records were updated. That makes sense. I will manually add a record and see how that goes.
    Thanks

  7. #7
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome. Please post back if you have any other questions regarding the form or query.

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

Similar Threads

  1. Totals (group b)y + Update query?
    By acenumber5 in forum Queries
    Replies: 4
    Last Post: 06-14-2012, 10:47 AM
  2. Option Group Query
    By SeaTigr in forum Queries
    Replies: 13
    Last Post: 04-23-2012, 12:49 PM
  3. Option Group
    By x__hoE__x in forum Access
    Replies: 2
    Last Post: 12-10-2011, 09:39 AM
  4. Option Group
    By huskies in forum Forms
    Replies: 9
    Last Post: 12-02-2009, 12:06 PM
  5. Option Group broken out
    By dcecil in forum Reports
    Replies: 3
    Last Post: 04-21-2009, 10:30 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