sort on form close

  • Thread starter Thread starter LGarcia
  • Start date Start date
L

LGarcia

Hi all,
I have a subform that comes off of a query. I have it sorted by the field
"Subject" as the default.
My users are able to go into any control on the form and right click to sort
by that field.
When the form is closed and then re-opend, the sort has changed from the
default. How can I re-sort the form based on the default either at the On
Close or On Open event? Using AccessXP.
TIA,
LGarcia
 
When the form is closed and then re-opend, the sort has changed from the
default. How can I re-sort the form based on the default either at the On
Close or On Open event? Using AccessXP.

Base the Form on a Query sorted by the default; in the Form's Close
event put

Me.OrderBy = ""
Me.OrderByOn = False

to undo any user sorts.

Of course, if your form complains that it's "out of sorts" afterwards,
don't blame me!
 
Back
Top