+ Reply to Thread
Results 1 to 2 of 2

Combobox via Select Case

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Combobox via Select Case

    Hello everyone. I have a userform in an excel spreadsheet that has two combo boxes on it (for now, more stuff willl be added). In the first combo box, the user may select from two options: Customer or Terminal. (I have that part up-and-running). For the second combobox what needs to get done is trickier.

    Depending on what the user selects I need the following to occur:

    1. If the user selects "Customer", then the second combo box will contain a list of Customers. That list is in an Access databse table called Customers.

    2. If the user selects "Terminal", then the second combobox will contain a list of terminals. That list is in an Access databse table called Terminals.

    I am using this Private sub to create the database connection:

    Please Login or Register  to view this content.
    The userform is launched via:

    Please Login or Register  to view this content.
    Any help is greatly appreciated. I am developing using Access and Excel 97.
    Last edited by AnthonyWB; 01-03-2011 at 01:02 AM. Reason: spelling error

  2. #2
    Registered User
    Join Date
    01-19-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Combobox via Select Case

    OK, I admit, this is a cheesy way to do it, but I still use. Create two combo boxes (give each a name), one for Terminals and one for customers. make them the same size. Place one on top of the other one. In your click event of your first combo box, decide which one to show.
    So basically if = terminal, hide customer, show terminal combo box.
    Just set one to one as hidden and one as visible or both invisible initially.
    Since you have each combobox setup with it's own query, your golden.
    makes life easier.

+ 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