Sorting records in form using numeric fields of each record

A

Amir

Hi!,

I have a form that shows records from one table. Each record has a numeric
field named "priority".
I want the form to show the records sorted by the value in the "priority"
field, so that records with the lowest values (e.g 1,2) in their "priority"
field will be on the top, and records with the highest values (e.g. 10) in
that field will be at the bottom.
How can I do that?

Thanks!,
Amir.
 
A

Allen Browne

Change the RecordSource property of your form to a SQL statement such as:
SELECT Table1.* FROM Table1 ORDER BY Table1.Priority, Table1.ID;
 
A

Amir

Thank you very much !!

Regards,
Amir.

Allen Browne said:
Change the RecordSource property of your form to a SQL statement such as:
SELECT Table1.* FROM Table1 ORDER BY Table1.Priority, Table1.ID;
 

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