My setup is VB6/Access2K. When loading a Form, I'm using this code:
Private Sub Command15_Click(Index As Integer)
Me.MousePointer = 11
Load DbDepForm
DbDepForm.Show
Unload Rent_Deposits_Menu
Me.MousePointer = 0
End Sub
The Form has a DataGrid1 and an Adodc1 connected to the Access mdb Table.
Is there a way to add code to the above so that when the Form with the DataGrid1 displays, the DataGrid1 will be sorted first by the DepDate field and then a second sorting by UnitNo? I thought possibly a SQL Select Group By statement in the above code, but I'm not sure how to set it up.
Thanks in advance.
Private Sub Command15_Click(Index As Integer)
Me.MousePointer = 11
Load DbDepForm
DbDepForm.Show
Unload Rent_Deposits_Menu
Me.MousePointer = 0
End Sub
The Form has a DataGrid1 and an Adodc1 connected to the Access mdb Table.
Is there a way to add code to the above so that when the Form with the DataGrid1 displays, the DataGrid1 will be sorted first by the DepDate field and then a second sorting by UnitNo? I thought possibly a SQL Select Group By statement in the above code, but I'm not sure how to set it up.
Thanks in advance.