P
Paul
Hi,
I am trying to test the feasibility of a request by some users to be able to
complete a field using a 'Windows style menu with sub menus' instead of a
combo box (they feel there will be too many options to locate the desired
one within the list), but I am hitting some barriers that perhaps someone
can suggest a solution to, or an alternative solution.
My Solution 1.
Use a treeview control on a pop up form.
Cons:
* Ensuring users have correct version of MSCOMCTL.DLL
installed/registered.
* Not really what was requested.
My Solution 2.
Use multiple combo boxes (one for category, one for sub category, one for
the option) that would update as an option is selected from each.
Cons:
* Slow to make a selection (multiple clicks required and difficulty to
check different categories).
* Not really what was requested.
My Solution 3.
Dynamically populate a shortcut menu with the necessary sub menus and items.
This can then be displayed when a button is clicked next to the control to
be completed and the selected control can be populated with the item chosen
from the list. I have got a fair way with this but hit the following
problems.
The only way I can come up with to know which button was actually clicked on
the menu is to programmatically create a function for each button, and set
the OnAction event of the button to that function (which then punches the
selected value into a text box). This needs to be done every time the button
next to the control is clicked in case there have been any updates to the
avialable optoins (held in a table). This leads to the following issues:
1. I will be unable to deploy this as an mdb (or in run time Access?) as
changes to modules are made by the code (the functions being created).
2. When the new code is created and saved, some variables/references appear
to be lost. I have a class module for resizing controls as forms are
resized, this code stops working (fails to fire) after running the routine
that creates the functions and saves the module. This leads me to fear that
other code could also react unpredictably after running the 'function
creation' code (like when code is 'ended' at the End/Debug prompt).
If anyone has any suggestions for other controls to use, or a better way of
determining which button on a dynamically created menu was clicked, please
share your ideas with me.
Many thanks
Paul
I am trying to test the feasibility of a request by some users to be able to
complete a field using a 'Windows style menu with sub menus' instead of a
combo box (they feel there will be too many options to locate the desired
one within the list), but I am hitting some barriers that perhaps someone
can suggest a solution to, or an alternative solution.
My Solution 1.
Use a treeview control on a pop up form.
Cons:
* Ensuring users have correct version of MSCOMCTL.DLL
installed/registered.
* Not really what was requested.
My Solution 2.
Use multiple combo boxes (one for category, one for sub category, one for
the option) that would update as an option is selected from each.
Cons:
* Slow to make a selection (multiple clicks required and difficulty to
check different categories).
* Not really what was requested.
My Solution 3.
Dynamically populate a shortcut menu with the necessary sub menus and items.
This can then be displayed when a button is clicked next to the control to
be completed and the selected control can be populated with the item chosen
from the list. I have got a fair way with this but hit the following
problems.
The only way I can come up with to know which button was actually clicked on
the menu is to programmatically create a function for each button, and set
the OnAction event of the button to that function (which then punches the
selected value into a text box). This needs to be done every time the button
next to the control is clicked in case there have been any updates to the
avialable optoins (held in a table). This leads to the following issues:
1. I will be unable to deploy this as an mdb (or in run time Access?) as
changes to modules are made by the code (the functions being created).
2. When the new code is created and saved, some variables/references appear
to be lost. I have a class module for resizing controls as forms are
resized, this code stops working (fails to fire) after running the routine
that creates the functions and saves the module. This leads me to fear that
other code could also react unpredictably after running the 'function
creation' code (like when code is 'ended' at the End/Debug prompt).
If anyone has any suggestions for other controls to use, or a better way of
determining which button on a dynamically created menu was clicked, please
share your ideas with me.
Many thanks
Paul