Form won't keep its sort order

  • Thread starter Thread starter Darrell Childress
  • Start date Start date
D

Darrell Childress

I have a form which is based on a table. I want the form to always be
sorted in ascending order by a field called "Number". In the Form's
properties, under Order By, I have tblSO_Items.Number. In form view, I
can right-click on the Number field and click "Sort Ascending" and it
sorts properly for the moment. I can save the form, but if I close the
form and re-open it, it loses its sort order and goes back to sorting by
another field.
I'm really scratching my head on this one. Any help would be appreciated.
Darrell
 
The OrderBy property may not be retained when you close the form.

Additionally, the OrderBy property is not applied unless you set OrderByOn
to True. (You can do this programatically in the form's Open event if you
wish.)
 
Make sure Order by On Load is set to Yes.



Darrell said:
I have a form which is based on a table. I want the form to always be
sorted in ascending order by a field called "Number". In the Form's
properties, under Order By, I have tblSO_Items.Number. In form view, I
can right-click on the Number field and click "Sort Ascending" and it
sorts properly for the moment. I can save the form, but if I close the
form and re-open it, it loses its sort order and goes back to sorting by
another field.
I'm really scratching my head on this one. Any help would be appreciated.
Darrell
 
Darrell Childress said:
I have a form which is based on a table. I want the form to always be
sorted in ascending order by a field called "Number". In the Form's
properties, under Order By, I have tblSO_Items.Number. In form view, I can
right-click on the Number field and click "Sort Ascending" and it sorts
properly for the moment. I can save the form, but if I close the form and
re-open it, it loses its sort order and goes back to sorting by another
field.
I'm really scratching my head on this one. Any help would be appreciated.
Darrell


I think the easiest method is to base a query off the table, and base your
form off the query. Then you can tell the query to sort by whatever field(s)
you want and it will be reflected on your form.
 
Back
Top