Results 1 to 7 of 7
  1. #1
    victor2525 is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    2

    Combo Box Drop-Downs


    I created a 2-column drop-down combo box in a form, but when I select the item I want, its ID # is recorded in the corresponding table rather than what is listed in the drop-down box. How do I fix this??

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Combo box columns are zero based so assuming it is bound to the ID field as the first column (0), you just use
    Code:
    Me.comboboxname.Column(1)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Saving the ID is what you'd normally do; that's kind of what it's for. That said, the Bound Column property of the combo determines which field is saved.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    victor2525 is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    2
    apologies, but where would i input this new code? in the form/design area?

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    In the same place as you put the original code....
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't think there is any code. Combo is working as it normally should, OP is expecting text value to be saved instead of ID.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Hi Paul - probably true - just thought some sort of answer might help the OP move on ...
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Cascading Drop Downs Based on Previous Selection
    By KirstyAmanda in forum Forms
    Replies: 6
    Last Post: 05-05-2017, 07:13 AM
  2. Drop downs error on clear
    By Ruegen in forum Programming
    Replies: 2
    Last Post: 10-31-2013, 12:40 AM
  3. database design: conditional drop-downs?
    By sebeckett in forum Access
    Replies: 5
    Last Post: 09-05-2011, 12:46 PM
  4. Collecting data via email with drop downs
    By tlyons in forum Access
    Replies: 2
    Last Post: 01-19-2011, 10:34 AM
  5. Drop downs and serching in subforms
    By joelwebster in forum Forms
    Replies: 0
    Last Post: 12-13-2009, 03:38 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