Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to sort a record by date field?

Status
Not open for further replies.

0200050

Programmer
Jun 3, 2003
58
FI
Hello everybody!

Refering to the title, I'd like to ask you a question about sorting records by date.

This is the situation: I have a form with many of fields. The form has one subform, and this subform even has another form in it.

Now the information on this FIRST subform are pretty messed up. I would like to organize them/sort them by using this date field, called FixingDate. I tried to clear it out by using queries(and the ready criterias: last, max, min...)
but my skills ran out.

I know sorting can be done by the quick buttons, but is there any other way?

I used
Code:
Docmd.RunCommand acCmdSortAscending/Descending
command(s) with only a small success, because after done this, I were unable to add more records(wonder why?).

All suggestions related to this issue are welcome!

I would be really pleased if someone enlighted me a little bit on this.
 
Take a look at the OrderBy and OrderByOn properties of the Form object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top