sort ascending

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form in Datasheet view
I need to do a sort ascending as soon as it open
How can I do a sort ascending programmatically
Thanks
 
You need to set the OrderBy property for the form.

If you go to design view and then browse the FORM
properties you will see OrderBy under the Data tab.

Good luck

Robin
 
Create a query that sorts as you wish, and use that as the RecordSource of
the form.

If you want to do it programmatically:

Private Sub Form_Open(Cancel As Integer)
Me.OrderBy = "SomeField"
Me.OrderByOn = True
End Sub
 
Back
Top