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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Order of fields in forms

Status
Not open for further replies.

stc

Technical User
Aug 23, 2001
25
GB
This is probably very simple, but I don't know Access particularly well. In a form I am displaying four fields taken from a table. One of the fields is the date of an enquiry. I want to display the records by date with the most recent at the top. I have set the date in the related table to this format, but am struggling to display the information in the form in this way. Any help gratefully received!
 

This may be of some use:

In the properties of the form under the DAta tab you will find the Order by property.
Help explains this pretty clearly

The OrderBy property is a string expression that is the name of the field or fields on which you want to sort records. When you use more than one field name, separate the names with a comma (,).

When you set the OrderBy property by entering one or more field names, the records are sorted in ascending order. Similarly, Visual Basic sorts these fields in ascending order by default.

If you want to sort records in descending order, type DESC at the end of the string expression. For example, to sort customer records in descending order by contact name, set the OrderBy property to "ContactName DESC".

regards jo
 
Hi - just as a workaround, you could just sort your table descending (By date)

HTH
Geoff
 
You can select a field, goto the Records Menu and select Sort then the sort Order. This function allows filters and other facilities which are quite useful. Sandy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top