Results 1 to 5 of 5

Thread: Combo selection

  1. #1
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116

    Unanswered: Combo selection

    I'm trying to create a form that will let the user select which query to run from the combo box? How do I do that? Whenever I select the combo box it wants me to pick only one. Do I have to do something else; maybe to put all the query names in a table? As you can tell this is new to me and I'm at a loss how to go about this.

    Thanks . . . texasalynn

  2. #2
    Join Date
    Feb 2003
    Location
    Auckland, NZ
    Posts
    150
    I am not sure exactly what you want to achieve.

    Do you want to set the datasource of a form based on what is selected in the combobox or do you want to change the datasource of the combobox dynamically?
    JJ Kennedy
    Double J IT Solutions
    www.doublejit.co.nz

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

  3. #3
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116
    I want to have the combo box show a selection of queries. But I don't want all queries - which is why I'm thinking a need a table that lists the ones I want to be shown in the combo box list.

    Does that make sense? texasalynn

  4. #4
    Join Date
    Feb 2003
    Location
    Auckland, NZ
    Posts
    150
    Yes!!

    You will need a table with all the queriw to use in them or you can use list items in the combobox. So instead of basing the combobox on a query. Select 'I will type the values that I want' In the Wizard and then type in the names of the queries you want to use.

    Once this is done. You need to change the datatsource of the form in the AfterUpdate event of the combobox(You will need to write some code).

    you will add the following code

    Code:
    Me.RecordSource = Me.comboboxname
    Me.Requery
    JJ Kennedy
    Double J IT Solutions
    www.doublejit.co.nz

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

  5. #5
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116
    And that is a problem because I don't know how.

    Thanks ... texasalyn

Posting Permissions

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