Form won't keep its sort order

  • Thread starter Darrell Childress
  • 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
 
A

Allen Browne

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.)
 
B

benyod79 via AccessMonster.com

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
 
B

Bill Smith

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top