Looping through a table's records and changing, then resorting

Joined
Nov 2, 2012
Messages
4
Reaction score
0
All,
I am new to Forums, as far as posting, and need some help.

I have an Access 2007 database with a split form bound to a table. The table has a field with number (indexed and not to duplicate) used as a PRIORITY field. The Split form is my Work In Process 'page' that I use to manage the items on the list with status and ecds and such. What I want to be able to do is, while looking at a particular record in the form part of the split form, change the PRIORITY and have the table adjusted automatically.

For example, if there are 5 records in the WIP table, each with a unique Priority in order without gaps, 1, 2, 3, 4, 5, and I am looking at say the record with Priority 3 on it, and I want to make it the #1 priority, I want to be able to overright the 3 to a 1 and have the table renumbered automatically using this as the NEW #1 and regardless what number it WAS, have the remaining items renumber as 2, 3, 4...

So, if I take record Priority 4 and make it 2, I want 1 to stay where it is, 4 to become 2, the OLD 2 to become 3, The old 3 to become 4, and 5 and 6 will stay as they are.

If I take 4 and make it 1, then 1 becomes 2, 2-3, 3-4 and 5 and 6 stay as they are.

Hope his makes sense and someone can help! Thanks ahead of time!

Mike
 

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