Field list in combo of a table from another combo

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mshakeelattari
    New Member
    • Nov 2014
    • 100

    Field list in combo of a table from another combo

    On a form, I have a combo box with list of tables using 'msysobjects.na me'. I want another combo showing list of fields of the table name selected in first combo. How is this possible? Please help me. Thank you.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    This is a very poor question. There are no signs you've done any work whatsoever before posting this. The best I can do at this point is to point you towards Cascaded Form Filtering which certainly can help you.

    If you get stuck then post back explaining clearly what you've tried and what you don't understand.

    Comment

    • mshakeelattari
      New Member
      • Nov 2014
      • 100

      #3
      Thank you. I have got idea.

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3653

        #4
        In general, you would need to use VBA to use the Table object and cycle through all the fields, assigning that list to the second combo box. The challenge is getting the list of fields into a recordset that is usable by the combo box. The only way I know how to do that is by using an ADODB recordset.

        But, other than this advice, I am not going to build this for you when you have not put forth any effort to work through this yourself or show any of your work thus far.

        Comment

        • isladogs
          Recognized Expert Moderator Contributor
          • Jul 2007
          • 479

          #5
          You may find some useful DAO code on Allen Browne's website. For example, Show Fields in a table & Show Field Names & Types from a table or query

          Comment

          Working...