ACC: How MS Access Saves Sort Order of Form Depends on VersionID: Q167928
|
Moderate: Requires basic macro, coding, and interoperability skills.
In Microsoft Access 7.0 and 97, the sort order that you apply to a field in
a form is saved when you save the form or datasheet, and is reapplied
automatically when you reopen the form or base a new form or report on that
form. This behavior is different from Microsoft Access 2.0. In Microsoft
2.0, the specified sort order is not reapplied when you reopen the form.
In Microsoft Access 7.0 and 97, the OrderBy property of the form is updated
with the control name when you save the form. If you want to change this
functionality, you must change the OrderBy property in the Open event of
the form. The following example demonstrates how to do so.
NOTE: The OrderBy property setting for the form will not be saved if you
open the form in Design view and then switch to Form view to change the
settings. You must open the form in Form view and then make the necessary
changes.
Private Sub Form_Open(Cancel As Integer)
Me.OrderBy = ""
End Sub
For more information about sorting data in forms, search the Help Index for "sorting data, forms," or ask the Microsoft Access 97 Office Assistant.
Keywords : kbusage FmsHowto FmsProb FmrCdbeh
Version : 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: April 26, 1999