Order By On Load property

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I was wondering if someone could tell me the purpose of the Order By On Load
property for a form, report, or query. I have read through a Help topic which
says : " If you want the last-applied sort order to be automatically applied
the next time that you open the object, set the Order By On Load property to
Yes."

If I save an object with the last-applied sort order, it always opens the
last way it was sorted, regardless of what this property is set to. If I
apply a sort, and do not save the object, the sort is not displayed the next
time, even if this property is set to Yes.

I am creating a class - one of the topics covering sorting - and can't see
the advantage of this property. Any suggestions as to when I'd use it?

Thanks!
 
Tammy said:
I was wondering if someone could tell me the purpose of the Order By On Load
property for a form, report, or query. I have read through a Help topic which
says : " If you want the last-applied sort order to be automatically applied
the next time that you open the object, set the Order By On Load property to
Yes."

If I save an object with the last-applied sort order, it always opens the
last way it was sorted, regardless of what this property is set to. If I
apply a sort, and do not save the object, the sort is not displayed the next
time, even if this property is set to Yes.

I am creating a class - one of the topics covering sorting - and can't see
the advantage of this property. Any suggestions as to when I'd use it?


Others may disagree, but my general advice is to not use the
OrderByOn property that way. First, the Filter and Order By
properties (at least prior to A2007) were fraught with
problems so they were not reliable and had undesireable side
effects. Second, the idea of saving a form's (or any other
heavy duty object's) design in a running application greatly
increases the chance of the front end db to experience
massive bloat and corruption. Further more, it can not even
be done in an MDE. People that have been bitten by these
issues usually modify their code to close a form to
explicitly prevent the form's design from being saved:
DoCmd.Close acForm. Me.Name, acSaveNo

OTOH, the OrderBy and, in some restricted situations, Filter
properties can be used effectively if they are not saved.
 
Back
Top