Multi-value field (MVF) using tree control

RonPaii

Member
Local time
Yesterday, 20:30
Joined
Jul 16, 2025
Messages
30
Attached is a sample database that emulates MVF using MS common control Tree Control "MVF_Control_Tree". It works in both x32 and x64 bit Access. It has the added benefit of supporting multiple levels of grouping of the available selections. The sample "frmUsers" opens when you open the database, demonstrating 3 methods of opening the "MVF" form and displaying the user selections using both single level and multi-level selection lists.

1754505345589.png

1) On the main form using an un-bound combo box, displaying selections as comma separated text in the combo box with single level selection.
1754505471427.png

2) On the main form, using an un-bound combo box, displaying selections in a sub-form "subFrmSelected" with multi-level select.
Color:
Blue: current row
Cyan: all selections in group are checked
Yellow: at least 1 selection in group is checked
White: un-checked
1754505607774.png

3) On the sub-form using a bound combo box with no source, displaying selections in the combo box with multi-level select.
1754505943203.png


All data is stored in normalized tables. Only the tree leaf selections are stored in the user selections table.

1754506478182.png
1754506538025.png
 

Attachments

After some trial and error and a little help from Copilot, I added the ability to show only selected options and then restore the tree to it's original state. Hiding involves saving of the tree to a collection, deleting the un-checked nodes then restoring it from that collection to show all. I was also able to improve the sizing and placing of the MVF form.

Before hiding un-checked and after hiding. No editing or saving is allowed when hiding.
1754683557648.png
1754683606319.png


The positioning is now below the calling control.
1754683708910.png
1754683734445.png
 

Attachments

Users who are viewing this thread

Back
Top Bottom