Click to See Complete Forum and Search --> : Help with Combo Box............


Tina
January 26th, 2000, 10:29 AM
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........

Johnny101
January 26th, 2000, 10:48 AM
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

Tina
January 27th, 2000, 11:41 AM
Thanks ! I have my application running as I wanted it to !