Jerry N
asked on
Access 2010: Hierarchy movement with 2 columns
We have a table of processes that the user should be able to move up/down to form the order in which they are executed when they click an Execute button.
The problem is that we also need to give the user the ability to include or exclude items from this list.
I was thinking of have a two column type of combo box, one with the processes, one with a checkbox. But I dont know how to give the user the ability to re-order the items by selecting a process and "moving" it up/down on the list.
For example a list like:
ProcessA YES/NO
ProcessB YES/NO
ProcessC YES/NO
ProcessD YES/NO
...
where YES/NO is a checkbox.
The user should be able to move say ProcessC on top of ProcessA and perhaps move ProcessD below ProcessA.
I'm open to any controls or ideas that you might have. The list will have the ability to grow - say up to 50 items or so. These are held in a table that we can append to and it would of course automatically appear as another new process.
The problem is that we also need to give the user the ability to include or exclude items from this list.
I was thinking of have a two column type of combo box, one with the processes, one with a checkbox. But I dont know how to give the user the ability to re-order the items by selecting a process and "moving" it up/down on the list.
For example a list like:
ProcessA YES/NO
ProcessB YES/NO
ProcessC YES/NO
ProcessD YES/NO
...
where YES/NO is a checkbox.
The user should be able to move say ProcessC on top of ProcessA and perhaps move ProcessD below ProcessA.
I'm open to any controls or ideas that you might have. The list will have the ability to grow - say up to 50 items or so. These are held in a table that we can append to and it would of course automatically appear as another new process.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help.
You also commented about potentially adding records to your list of processes. When you do that, make sure that you give it a [SortOrder] equal to:
NZ(DMAX("[SortOrder]", "yourTable"), 0) + 1
You also commented about potentially adding records to your list of processes. When you do that, make sure that you give it a [SortOrder] equal to:
NZ(DMAX("[SortOrder]", "yourTable"), 0) + 1
ASKER
Hopefully you will see this -
It works great. How do I have the highlight follow the movement?
If I have the second item selected and move it up, the highlight stays on the new second item.
I have tried this and it seems right but the highlight doesnt move:
Me.lstHier.Selected(Me.lst Hier.Items Selected(0 ) + Direction) = True
It works great. How do I have the highlight follow the movement?
If I have the second item selected and move it up, the highlight stays on the new second item.
I have tried this and it seems right but the highlight doesnt move:
Me.lstHier.Selected(Me.lst
As long as the bound column of your list is the PK (not the sort order), the selection should stay with the item you just moved.
ASKER
thank you (AGAIN!) worked like a champ!
ASKER
Thanks!