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........
Printable View
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........
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
Thanks ! I have my application running as I wanted it to !