Results 1 to 9 of 9
  1. #1
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376

    Add items to Combo Box isn't working

    Hello all,



    I have been working on a file for a while and I wanted to make it easier for users to Add items to combo Boxes on the fly and I cannot get it to work. If you open the frmAnimalDataEntry-Tabbed form try to select the "Breed" and add something that isn't there, it gives the error that the item isn't in the list. I thought I had everything set properly accorPets-11 Dave.zipding to videos I have seen but I just can't seem to get it to work properly. What am I missing

    Pets-11 Dave.zip

    Thanks
    Dave

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi Dave

    The best method is to have a Command Button to Open a Form to add a New Breed.

    Then when you reenter the Combobox it is Requeried to display the Breed you have just Entered.

    See the attached
    Attached Files Attached Files

  3. #3
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    Mike,

    I looked at the file you attached and I didn't see a command button added to the form

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi Dave

    My apologies I put the Command Button on the frmAnimalDataEntry.

    I have now added it to the correct Form.
    Attached Files Attached Files

  5. #5
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    Mike,

    I see what you did now, but I would like to use the built in functionality of Access if I can. I think it would be less cumbersome for users don't you?

    Thanks Dave

  6. #6
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi Dave

    True but you will need to use a NotInList Event for Multi Fields which involves some knowledge

  7. #7
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Here is my modification to the dB.
    It uses the "Not In List" event of the combo box to add to the table "tblBreed" what was typed in to the combo box.
    Attached Files Attached Files

  8. #8
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    Steve,

    That's what I wanted thanks for putting that in there. VBA is certainly not a strong suit of mine yet. Now I can incorporate that into other Combos.

    Thanks again

    Dave

  9. #9
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Remember that you can use the "Not In List" event to open a form to add more data on more than control.

    Good luck with your project...........

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

Similar Threads

  1. Replies: 5
    Last Post: 09-20-2017, 10:07 AM
  2. Replies: 3
    Last Post: 11-27-2014, 06:38 AM
  3. Design Menu Items not working
    By 400Lifer in forum Misc
    Replies: 1
    Last Post: 05-05-2012, 10:18 AM
  4. Replies: 5
    Last Post: 03-12-2012, 02:58 AM
  5. Selecting Items in a combo box
    By Ferdi in forum Programming
    Replies: 6
    Last Post: 03-15-2011, 09:12 AM

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