+ Reply to Thread
Results 1 to 3 of 3

Removing Duplicates from ComboBox and Populating one combobox based on another

  1. #1
    Registered User
    Join Date
    06-27-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    16

    Removing Duplicates from ComboBox and Populating one combobox based on another

    Hello everyone,

    First let me say that your team of specialists has help my job a lot easier, and I have learned quite a lot from your advise, for which I am very thankful. Now on to the task at hand, I am trying to "remodel" our purchasing agents database, and I need help with combo box functionality. Basically, I am populating my First Name and Last Name combo boxes based on ranges in my spreadsheet. However, First or Last Names may duplicate. I would like my combo box to use only unique instances for the first name, then based on the first name selection, populate the last name combo box. Then based on the combination of First and last name, provide the remaining information in the available text boxes. I have created custom search forms before but typically only one combo box, and because the amount of purchasing agents is over 200, a single combo box with first and last name is not very practical. Any help you can lend me is very welcomed. I have attached a sample file with bogus data for your convenience.

    Below is the code I am using to initialize my form

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Removing Duplicates from ComboBox and Populating one combobox based on another

    If you know the purchasing agent's name, you are also able to identify his/her initials.

    If you populate the combobox with their full names, beginning with their initials you only have to type these initials to gain an almost 100 % hit.

    Try this:

    Please Login or Register  to view this content.
    PS. Please avoid additem to populate Comboboxes, Listboxes
    and please, do not use Setfocus (but use the Tabsequence instead)
    Last edited by snb; 11-28-2010 at 08:20 AM.



  3. #3
    Registered User
    Join Date
    06-27-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Removing Duplicates from ComboBox and Populating one combobox based on another

    Thank you snb. That worked, unfortunately It only solved one issue. I was able to solve the entire problem by using a static list for the first combobox and then creating a dynamic list for the second combobox and displaying the values of the list in the remaining text boxes. Works Great!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1