I have transfered the data from the database into a recordset. Now i want to query the recordset without going into the database. How will i do that ?
Thanks
Printable View
I have transfered the data from the database into a recordset. Now i want to query the recordset without going into the database. How will i do that ?
Thanks
You can use the filter propertie of the recordset. This is like the WHERE clause of a SQL string, but without the WHERE keyword.
rst.filter = "custid=1"
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
How do I sort the recordset ?
Thanks
Hello:
You can use MSFlexGrid. You have to connect the recordset to MSFlexGrid.
Here is the code:
MSHFlexGrid2.Col = 2 'The column you want to sort
MSHFlexGrid2.Sort = 1 'Set the column to ascending order
I hope I understand you correctly
Good Luck
To filter use
rs.Filter = "CustID = 1"
To sort use
rs.Sort = "CustID"
It's all in the MSDN Documentation!