Results 1 to 6 of 6
  1. #1
    grkatz823 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    8

    Form Text Box populated by other row in form not updating in spreadsheet or editable

    My form is currently set up so that the 'material' is a drop-down list containing two columns, the name of the material and the unit of measurement (feet, meters, liters etc...) used for that material. When I pick one from the list the Material row updates with the name of the material and the Unit row updates with the unit. I did this by making the control source of the unit textbox '=[material].[column](1)'. However, when I use this formula, the 'unit' textbox does not move the unit info to the appropriate spreadsheet where the data should be stored, nor is the textbox editable (enabled is 'yes', locked is 'no').

    Is there a better way to automatically populate the 'unit' field so that it is editable and updates the main table?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Populate the "unit textbox" from the AfterUpdate event of the ComboBox (drop-down) instead of the ControlSource of the "unit textbox".

  3. #3
    grkatz823 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    8
    I tried doing [Unit].[ControlSource]([material].[column](1)) from the AfterUpdate event of the combobox but I don't think that's the correct expression as it isn't doing anything. Even if it was, how or why would it change anything?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What you want in the AfterUpdate event is:
    Me.[unit textbox] = Me.material.[column](1)

  5. #5
    grkatz823 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    8
    Put it in the code builder and it worked. Thanks

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

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

Similar Threads

  1. Unbound Form and Editable Subform
    By tndinnc in forum Forms
    Replies: 6
    Last Post: 04-19-2013, 05:42 PM
  2. Replies: 3
    Last Post: 02-07-2013, 09:53 PM
  3. Editable & viewable form
    By ScottXe in forum Forms
    Replies: 3
    Last Post: 08-05-2012, 10:47 AM
  4. Populate Form And Make Editable
    By Rick5150 in forum Forms
    Replies: 1
    Last Post: 10-04-2011, 09:04 AM
  5. Replies: 2
    Last Post: 05-06-2011, 02:00 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