I have the below code on a command button that will sort
records based on a number in the ChangeOrder field on
the form. This works good. I can change the number in the
ChangeOrder field and sort the records the way I need.
These records are PartNumbers and are always associated
with a ECN Number. My issue is when I go back to this ECN
Number and I view the PartNumbers on the subform I need
for them to automatically sort based on the Numbers in the
ChangeOrder field. Rignt now they always go back to the
original order. How can I do this? Do I need to put
this same code on another Event to accomplish this?
records based on a number in the ChangeOrder field on
the form. This works good. I can change the number in the
ChangeOrder field and sort the records the way I need.
These records are PartNumbers and are always associated
with a ECN Number. My issue is when I go back to this ECN
Number and I view the PartNumbers on the subform I need
for them to automatically sort based on the Numbers in the
ChangeOrder field. Rignt now they always go back to the
original order. How can I do this? Do I need to put
this same code on another Event to accomplish this?
Code:
Me.OrderBy = "ChangeOrder " & SortDir
Me.OrderByOn = True