How do I sort a table...

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
 
D

Douglas J. Steele

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top