How do I sort a table...

  • Thread starter Thread starter TroyDDaniels
  • Start date Start date
T

TroyDDaniels

This should be an easy one for someone.


Public Sub test()
DoCmd.OpenTable ("OSM Table 1")

End Sub

I'm this far, pretty good yes? Now I need it to sort the table in
ascending order under a field called [Meal Total] and go to the first
record. Can anyone help me?

Thanks
 
You should never be working directly with tables. That's what forms are for.

Create a query that sorts the data in the desired order. Use that query as
the Recordsource for the form or, if you decide not to use a form, open the
query instead of the table.
 
Back
Top