Click to See Complete Forum and Search --> : sorting
VBBandit
January 7th, 2000, 12:44 PM
I have put a dbgrid control on my form and assigned its datasource with the help of a data control. I have
sorted my table in the backend(access).But the values when assigned to the col in the grid do not appear
in a sorted order. Is there any way to overcome this problem?
Any help on the topic would be appreciated.
January 7th, 2000, 04:35 PM
If RecordSource property of DC is a table name then replace it with Select statement containing ORDER BY. Example for Nwind db Customers table:
SELECT * FROM Customers ORDER BY City.
If you already have select statement in RecordSource, just add ORDER BY clause.
Vlad
January 9th, 2000, 06:06 PM
Hi !
As your back end is Access, develop a query suitable to your requirements. Create a db control on your form and in the
Record Source property you have to give the name of the query, instead of table. Then all fields in the sorted order ( as
you desire) could be seen.This I checked practically and it is working well.
Satya
Email: snchandu@hotmail.com
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.