Sorting when a form opens

S

Shane Nation

Please can someone tell me how I can set a form to sort A-Z on the "Name"
filed each time it opens?

Ialso need to sort a table in the same way?

Thanks

Shane

Access 2003
 
A

Allen Browne

To have the form sort that way, create a query into the table.
In the Sorting row under your name field, choose:
Ascending.

Open your form in design view.
Open the Properties box (View menu).
Set the form's RecordSource property to the name of the query.
The form will now sort as you requested.

Do not rely on records being sorted in a particular way in the table.
Although you can set the OrderBy property for the table (Properties box, in
table design), it is better to use the query to achieve the sorting.

BTW, if you really do have a field called "Name", consider renaming it to
something else. Many things in Access have a Name property, so Access is
likely to get confused between the field called Name and the Name of the
form, for example.
 

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