|
-
January 7th, 2000, 01:44 PM
#1
sorting
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, 05:35 PM
#2
Re: sorting
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, 07:06 PM
#3
Re: sorting
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: [email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|