Results 1 to 7 of 7
  1. #1
    Ceichhorn is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2017
    Posts
    23

    Combo Box not populating field correctly

    Hey all,



    I've got a combo box that has a row source selected from a table, and then I want the chosen selection of that combo box to populate a field from a second table. Seems pretty simple, but while the combo box will allow me to make a selection (and shows the correct options), the selection isn't actually populating the field from the second table as I expect it to. I believe I have set up the relationship between the tables correctly, with referential integrity enforced. Is there something obvious I could be missing here?

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,478
    Is that combobox bound to a field from the table of the form? Look at the Control Source in properties of that combo box.

  3. #3
    Ceichhorn is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2017
    Posts
    23
    Yes it is, Bulzie. I have also left it unbound, to see if that would work instead. Curiously, the other combo boxes on this form (which I did not originally create) are left unbound but still seem to... magically populate the fields in the primary table as they are supposed to. I guess I don't understand how this works, because the control source is left blank for the combo box but still populates the appropriate fields, while the combo box I've created specifies the field it should populate but doesn't do so anyway.

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,478
    The RowSource on a combobox only populates the list to choose from, it cannot add a value to a table until there is a bound field in the Control Source or in code somewhere like the AfterUpdate event of the combo box or maybe the BeforeUpdate of the Form, it moves the value somewhere. Does the form where these fields are only have 1 table it uses or is it a query? If a query maybe some of the fields are not updateable?

  5. #5
    Ceichhorn is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2017
    Posts
    23
    Bulzie,

    It's a table, although I also tried a query. I'm going to look and see if this is all being coded -- I didn't think to check there. Will report back with solved/nope-still-looking as soon as I can!

  6. #6
    Ceichhorn is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2017
    Posts
    23
    Bulzie,

    Yep this was coded in the back end: all other control sources were defined explicitly in VBA, so I just added mine to the list and it populated correctly. Thanks Bulzie!

  7. #7
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,478
    Your welcome.

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

Similar Threads

  1. Replies: 5
    Last Post: 06-27-2016, 07:31 AM
  2. Replies: 3
    Last Post: 12-14-2013, 12:32 PM
  3. Form ComboBox not populating correctly
    By School Boy Error in forum Forms
    Replies: 13
    Last Post: 10-03-2012, 08:55 AM
  4. Number Not Populating Control Correctly
    By libraccess in forum Forms
    Replies: 6
    Last Post: 08-30-2012, 02:13 AM
  5. Replies: 2
    Last Post: 08-16-2012, 10:02 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