Results 1 to 8 of 8
  1. #1
    TUPJK is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    17

    Automatically adding text to a drop down list choice


    Say I have a combo box and instead of choosing a choice from the drop down list I choose to enter in a new choice via text input

    Is there a way to have this new choice automatically stored in the drop down list portion of the combo box so I can just click that option when I use it next? (like in the next entry I enter in?)

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Yes, and with Access 2007 it is very easy and NO CODE is necessary.

    First, have a form for entering the new data. And set its DATA ENTRY property to YES.

    Then go to the combo box on the form you currently have and select that new form from the dropdown in List Items Edit Form which is in the DATA tab of the combo box's properties.

    And there you go.

  3. #3
    TUPJK is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    17
    Thanks again Bob!

  4. #4
    TUPJK is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    17
    Do I have to close and re-open the form for this to take effect? It isn't popping up automatically.

  5. #5
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by TUPJK View Post
    Do I have to close and re-open the form for this to take effect? It isn't popping up automatically.
    what should happen is that you type something into the combo box and then hit enter. It should give you a message asking if you want to add that value to the list. Then if you select YES, it will open up the form that I told you to create and put the name of in the combo's List Items Edit Form property. Once you have put in the new information, you close that form and it should now exist in the combo box.

  6. #6
    maax555 is offline Novice
    Windows 10 Office 365
    Join Date
    Jan 2024
    Posts
    5
    Hi, I have the same issue as the original poster, however on a previous access DB I created (many years ago), when you entered the new data into the field and it was not recognised the pop up box would ask you if you wanted to create/save the data (part Number in my instance). Without leaving the form or field that new entry was created in the part number table and I could simply carry on entering data. This may have been achieved through VB/Macros but such a long time ago.
    Is there a way I can achieve this?

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Google: access not in list add to combobox

    Post back if you're still stuck
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    Join Date
    Apr 2017
    Posts
    1,679
    You can do it without any coding when the combo's RowSource is a single-column field from table/query, which is the source of form with this combo. I.e. you don't use lookup table, but select any earlier entred value from field of table.

    An example:
    You have a table SomeTable, with a field SomeField, and a form based on this table. Put a combo into form with field SomeField as source;
    Set the RowSource of combo as query
    Code:
    SELECT DISTINCT SomeField FROM SomeTable ORDER BY SomeField ASC
    Set the LimitToList property of combo to FALSE (NB! To be able to do so, the RowSource query must return a single field - at least this was the condition when I last tried this!);
    Set the BoundColumn property of combo to 1, and the ColumnWidth to e.g. "2.5";
    It's all!

    To get same functionality for combo using lookup table needs some amount of VBA (I have seen some posts here how to do this, but I never had any need to do this myself!).

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

Similar Threads

  1. List box update from combo box choice
    By allykid in forum Forms
    Replies: 1
    Last Post: 03-08-2011, 10:06 PM
  2. Replies: 11
    Last Post: 01-06-2010, 03:27 PM
  3. datasheet view adding fields drop-down box
    By techexpressinc in forum Access
    Replies: 2
    Last Post: 09-09-2009, 05:35 AM
  4. Problems adding a drop down box to report/query
    By rachelm920 in forum Access
    Replies: 1
    Last Post: 05-14-2009, 09:19 AM
  5. Adding a drop down box to change form skins
    By intrepid401k in forum Access
    Replies: 0
    Last Post: 01-11-2009, 05:22 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