• Dynamic Combo Box (Access 2000)

    Author
    Topic
    #359844

    Is it possible to have VBA create a combo box? I would like to have the combo box be based on a different record source (SQL statement) depending on which item is chosen in an Option Group.

    Thank you.

    Viewing 1 reply thread
    Author
    Replies
    • #540447

      i don’t know about creating a combo box with vba
      but you can set the row source of a combo box with vba
      combo1.rowsource = some query or some sql
      HTH

    • #540559

      The methodology is to have an AfterUpdate event fire on your option group that sets the Row Source of your combo box to a dynamically generated SQL statement. I’ve attached an Access 2000 sample of how you might go about it; as I seemed to have missed breakfast, the sample is food-centric!

      HTH

    Viewing 1 reply thread
    Reply To: Dynamic Combo Box (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: