Display Records In Reverse Order

G

Guest

I have a form which contains general information about gauges. This form
contains a subform listing the calibration history of the gauges. Is it
possible for records in the subform to be diplayed in reverse order, so that
the last record entered is displayed first (reverse chronological order).
 
A

Allen Browne

Create a query that sorts the records as desired.
Set the form's RecordSource to the name of the query.

It is also possible to set the OrderBy of the form, using DESC to get
descending order. Remember to set OrderByOn as well.
 
G

Guest

Thanks for the quick response,
I have tried setting the OrderBy property of the subform to sort by the date
in descending order, but it does not work. It will not sort any of the fields
on the subform. The table for the subform contains two IDs ID1 is linked to
ID1 of the main form. ID2 is the subform's own ID number. Could this have
anything to do with it?
 
A

Allen Browne

Did you include the line:
Me.OrderByOn = True

The presence of the foreign key (ID1) and primary key (ID2) is normal - not
an issue.
 
G

Guest

Thanks alot, I've managed to get it working now.

Allen Browne said:
Did you include the line:
Me.OrderByOn = True

The presence of the foreign key (ID1) and primary key (ID2) is normal - not
an issue.
 

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