Requerying a Flex Grid

I have a VB6 form that uses the Data Environment and a command object that uses a table to initially populate a flex grid on the form. I want to be able to limit that list based on criteria that I choose from a list box. For Example: If I choose Seattle from the list, the flex grid would automatically requery to only show records associated with Seattle.

Thanks in advance
mark12Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Jon_RaymondConnect With a Mentor Commented:
You have to requery the grid every time the list box item is selected.  I don't know if that's posible with a data environment, since it would have to use a select query with a parameter that you supply from the list box and then refresh or requery.  But, you could code a connection to execute a query and return the results to repopulate the grid.  I use arrays to hold recordsets returned this way.  Then loop through the array to populate the grid.  This would give you more direct control over exactly when to refresh the grid.
0
 
dosylCommented:
Do you use MsFlexGrid, VsFlexGrid witch one?
0
 
MarineCommented:
You will still be required to repopulate that flexGrid.
0
 
johnmhatCommented:
Jon is right, you can assign the parameter the values of the list box...Do you need some code?  Is the query called from the database(Querydef) or is it an array?
0
All Courses

From novice to tech pro — start learning today.