Why don't you use SQL statement in your RecordSource statement?
What type of control you're using? Data Control?
Maybe you can do it like this:
Over here i use the Biblio.mdb database as my sample code.
I assume that you have add a DBGrid control and Data control in your form layout, and set the DBGrid DataSource to Data control.
Code:Private Sub Form_Load() Data1.DatabaseName = App.Path & "\Biblio.mdb" 'For Sorting the record base on the PubID Desc Data1.RecordSource = "SELECT * FROM Publishers Order By PubID DESC;" or 'For Sorting the record base on the PubID Asc Data1.RecordSource = "SELECT * FROM Publishers Order By PubID ASC;" Data1.Refresh DBGrid1.Refresh End Sub





Reply With Quote