Link to home
Start Free TrialLog in
Avatar of David Bigelow
David BigelowFlag for United States of America

asked on

How do I have a combo box populate two other combo boxes?

I have a report that I can modify in order to meet customer needs. Typically I have a Workload and a Queue report in which supervisors can list everyone trained in a Workload, any task or in a Queue, any workload. Or, they can pinpoint the workload and the queue, which becomes a "Skill."

The Skill is a contatenation of the Workload and the Queue. On my tabbed form to generate reports, the third tab is Skill List. Instead of giving the supervisor an option to choose a Workload and a Queue, this tab should only have the Skill option, which combined the workload and queue.

I want to hide the workload and queue combo boxes, and then have the Skill combo box, on change, requery the workload combo box, which would then, on change, requery the queue combo box.

Why? This would allow me to apply the current array of conditonal report settings to this third report.

As to the row sources for the workload and query combo boxes, I'm sure it is some sort of inner join that has to be worked out to get the Workload combo to fill with the workload from the Skill combo, and then the query combo to fill with a match from the Skill combo, but it would take me a couple of days, at least, to figure it out, partially because I'm interfacing with a combo box, not only another table.

So, I'm needing to do two things:
1. Set the row sources for the workload and queue combo boxes (the hard part for me).
2. Set the query on change on the Skill and workload combo boxes to query the workload and queue combo boxes
Sample-Training-Database-2015-01-12--2-.
Training-Database-be-2015-01-12--2-.accd
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

I open your database, after renaming the file extensions and such, and relinking. However, I have no idea which form you're referring to, or which report, etc. When posting your files here, please be sure that you (a) insure they'll run when downloaded and (b) give complete instructions as to how to recreate your issue.

With that said: You don't really have an "issue", you're asking us to do your work for you. You wrote "but it would take me a couple of days, at least, to figure it out," - which would seem to indicate that you feel your time is more valuable than ours. Please understand that we're all volunteers, and while we enjoy helping others, we don't like to be treated like employees. We'll help you, but we don't work for you, and we're not here to do your work when you're too busy to do it yourself.
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
For the rowsource of your Skills combo you need to have SELECT SkillName, WorkloadID, QueueID

Then in the onChange event of that box you set the VALUE of the other combo boxes like:
cboWorkload.value = cboSkills.column(1)
cboQueue.value = cboSkills.column(2)

You don't need to update the rowsource of the hidden combo boxes because no one can see it anyway.
--
JimFive
Avatar of David Bigelow

ASKER

Dale, my man, you are the Expert! Thank you for taking the humble approach, taking my description for what it was worth, and helping me out! Based on your simplification of everything, I assure you, my thoughts were on a trajectory that wasn't set to return for quite a while. Everything is working almost as desired. When I make a selection in Combo1, Combo2 has one choice. When I select that, Combo 3 has one choice. Bingo!

The tweak I need, and what I was ultimately looking for, is, "How can I have Combo2 and Combo3 not only make it the only option, but in fact to make it the selection, to populate Combo2 and Combo3 based on the selection made in Combo1. Remember Combo2 and Combo3 will be hidden.

I realize that this seems redundant, in the way that JimFive points out, but on my form, frm_TrainingByEe, behind the Run Report button are 16 extensive conditions. Instead of rewriting all those conditions to fit 3 combo boxes, instead of 4, I'd rather just hide those two boxes and use the 3rd combo box to populate them. In the first two pages of that tabbed form, I want to be able to run exclusively Queues or exclusively Workloads. On this third tab, I want it to be only a concatenation of the two fields.

So the final help I need is in paragraph 2.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you, hnasr!
Welcome!