Cjbuechler
IS-IT--Management
I need to reoder the value of the priority field in a table (table1). For example if I have a form called Form1 that displays the records:
RecordName Priority Description
Red 1 blah blah
Blue 2 etc.
Green 3 etc.
Orange 4 etc.
Purple 5 etc.
and if I change the Priority of Green to 0 I want the other priorities to change to account for it rather than just doing a plain sort by priority.
RecordName Priority Description
Green 0 etc.
Red 1 blah blah
Blue 2 etc.
Orange 3 etc.
Purple 4 etc.
I figured setting up an event procedure on Update on the Priority field that basically selects the table, sorts them by priority and steps through resetting the priority starting at 1 and moving up from there would be fine but any attemps I have made don't do the resetting part of things. Any ideas?
RecordName Priority Description
Red 1 blah blah
Blue 2 etc.
Green 3 etc.
Orange 4 etc.
Purple 5 etc.
and if I change the Priority of Green to 0 I want the other priorities to change to account for it rather than just doing a plain sort by priority.
RecordName Priority Description
Green 0 etc.
Red 1 blah blah
Blue 2 etc.
Orange 3 etc.
Purple 4 etc.
I figured setting up an event procedure on Update on the Priority field that basically selects the table, sorts them by priority and steps through resetting the priority starting at 1 and moving up from there would be fine but any attemps I have made don't do the resetting part of things. Any ideas?