Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dynamic Combo Box (Access 2000)

    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.

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Tennessee
    Posts
    194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dynamic Combo Box (Access 2000)

    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

  3. #3
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dynamic Combo Box (Access 2000)

    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
    Attached Files Attached Files
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

Posting Permissions

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