is it possible in access to make asub combo box from amain combo box?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kurai hikari
    New Member
    • Oct 2009
    • 15

    is it possible in access to make asub combo box from amain combo box?

    itis like menus and sub menus .
    for example i have acombo box with 5 selections in it. and each selection has it's own 3 sub selections . now i want the sub selection appear when i click on the main selection in the combo box.and so on with the rest of the selections

    is this can be done in access?
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi Kurai, and Welcome to Bytes!

    A combo box cannot have subsections, so what you ask cannot be done with one combo on its own. It is possible to use multiple combo boxes to do so, where the outermost represents the top-level choice and the innermost represent progressively finer detail layers. We have an insights article on this topic which may help you - see Cascading Combo/List Boxes for the details.

    It is possible to use a different form of control to store tree-structured lists. There is an ActiveX tree control available for this purpose. Its use is by no means simple, however, and unless you have developed a good level of programming expertise to be able to populate the tree details yourself via code I would not recommend you consider such an approach.

    -Stewart

    Comment

    • kurai hikari
      New Member
      • Oct 2009
      • 15

      #3
      it worked

      thanks alot the example was exactly what i wanted to make. thank u very much:)

      but i find some difficulty in doing that with three combo boxes. for example: i want to press on the company name in (combobox1) to see it's related employees in (combobox2), then i press on the employee to see his achievments in (combobox3)

      so how can this be done ? i have 3 tables only 2 tables r connected with the ID of the company, but the third which contains the achievments is connected to the tblemployee with the EID.


      thanks

      Comment

      • beacon
        Contributor
        • Aug 2007
        • 579

        #4
        Hi Kurai,

        It sounds like you should be able to set up a query with these three tables, as there are relationships established between the three, and then develop your combo boxes from the query instead of the tables.

        I haven't tested this out and it's been a while since I've done it myself, but I think the only difference for the last combo box (if you create a query with all the info in it) would be that your WHERE statement would have two conditions: "WHERE [CompanyID]=" & Me!CompanyID & " AND [EmployeeID]=" & Me!EmployeeID.

        Comment

        Working...