CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 1999
    Location
    MD, USA
    Posts
    34

    Help with Combo Box............

    I have some data showing on a Flexgrid (one of the coulmns is YEAR). I have placed a combo box on the form and it is populated with valid years on form load. But am not sure how to use a combo box to filter the records in the grid by year........


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Help with Combo Box............

    If you're pulling the data in the grid from a database then one possible way would be:

    When the user chooses a year from the drop down list (in the click event of the combo box), append a where clause to your SQL statement that says something like "WHERE Year = " & cboYear.Text and then refresh your recordset in the grid.

    I don't think there is a "filter" method or anything like that for the MSFlexGrid, but I don't use all that often.

    Hope this helps,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  3. #3
    Join Date
    Dec 1999
    Location
    MD, USA
    Posts
    34

    Re: Help with Combo Box............

    Thanks ! I have my application running as I wanted it to !


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured