Results 1 to 7 of 7
  1. #1
    texas1014 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    13

    table update

    Is there a way to have a field on a table updated based on the selection made on another field? I have two tables, the tblMasterItem and tblHW_SW. on the tblMasterItem table, I am able to use a combobox to make a selection. The combo box uses the information from tblHW_SW. when I make the selection from the combo box, I want the value from another column on that table to populate the information on the tblMasterItem table.

    Example, on the HW_SW table, lets say my choices are:

    Type Example______________
    Hardware | Tower, Monitor
    Software | Text Editing, Games
    Options | Cases, Memory Upgrades



    When I select Hardware from the combo box, I want the value "Tower, Monitor" to appear on the Example column.

    I posted a similar thread on the query forum because I was thinking of using an update query, but I am wondering if this is a better solution.

    Thanks,
    Tex

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,525
    You shouldn't store Example. See if this helps:

    http://www.baldyweb.com/Autofill.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    texas1014 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    13
    Thanks for the document. I know how to do that for forms, but I am working directly with the tables; no forms have been created yet. Is there a way to do this on tables? If I am misunderstanding you, please forgive me.

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,525
    Most of us never let users work in tables, and in any case no way to do it in a table. Normalization rules would say not to store that second value anyway, and I wouldn't do it. You get it in queries by joining the tables.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    texas1014 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    13
    Thanks. I didn't realize it was not a function at all.

    Tex

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,525
    No problem Tex.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    texas1014 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    13
    I created a form that looked like the table and added the code as an after update and it works on the form. Now I won't be driving myself nuts...

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

Similar Threads

  1. Update Table after Record Update with Form
    By speciman_A in forum Forms
    Replies: 25
    Last Post: 10-31-2014, 01:00 PM
  2. Replies: 1
    Last Post: 05-17-2013, 12:53 PM
  3. Replies: 7
    Last Post: 09-21-2012, 11:09 AM
  4. Replies: 1
    Last Post: 02-08-2012, 04:50 PM
  5. Replies: 1
    Last Post: 01-22-2011, 12:23 PM

Tags for this Thread

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