Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    24

    Unanswered: Filling ComboBox

    On the top of my form I have an option group with 3 options, lets call them ‘a’, ‘b’ and ‘all’.

    On the form I have a combo box. I would like the combobox to be filled with data, depending on the fact whether I select option ‘a’, ‘b’ or ‘all’.

    So If I select ‘a’, I would like to run Query ‘a’ and fill the combo box with it’s data. The same of course for ‘b’ and ‘all’.

    How would I be able to do that? Is there a wizzard that can provide help?

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    Use the RowSource of the comboBox in a SELECT CASE Statement

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Post

    Example

    PHP Code:
    SELECT Case chk
      
    Case = 
        yourComboBox
    .RowSource="SELECT * FROM yourTable1;"


      
    Case = 2
        yourComboBox
    .RowSource="SELECT * FROM yourTable2;"


      
    Case = 
        yourComboBox
    .RowSource="SELECT * FROM yourTable3;" 

Posting Permissions

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