Combo box dependent on another combo box, or not.

In the form, frm_TrainingByEe, I have three tabs. The first two have four combo boxes each. I would like to have:

Tab 1: Skills: Shifts and Banks
Bank combo independent of Shift combo, if Shift combo is not populated.
This is how it is now. I can leave the shift blank, select Bank B, and the Report will be for Bank B AM and Bank B PM.

How can I retain this option for when Shift is not populated, but requery the Bank combo box if the Shift combo box is populated? Then if AM is selected, only the banks on the AM shift will be in the Bank combo box.

I need the same structure for Workload and Queue. That is, Queue independent of Workload, but dependent on Workload if workload is populated. They are connected on the Skills table.

I think I can figure out the settings for tab 2 if I get these first two.
SampleSkills.accdb
LVL 1
David BigelowStaff Operations SpecialistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GozrehCommented:
Will show you the structure you can do for Workload and Queue.

By the row source on cbo_Queue_ID you should use:
SELECT tbl_Queues.Queue_ID
FROM tbl_Queues LEFT JOIN tbl_Skills ON tbl_Queues.Queue_ID = tbl_Skills.Queue_fk
WHERE ((([Forms]![frm_TrainingByEe]![cbo_Flow_ID])=[Flow_fk] Or ([Forms]![frm_TrainingByEe]![cbo_Flow_ID]) Is Null))
GROUP BY tbl_Queues.Queue_ID, tbl_Queues.Queue_ID
ORDER BY tbl_Queues.Queue_ID;

and under the event tab by "On Got Focus" enter Event Procedure
Private Sub cbo_Queue_ID_GotFocus()
   Me.cbo_Queue_ID.Requery
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David BigelowStaff Operations SpecialistAuthor Commented:
Thank you so much! I got it working for the rest of the combo boxes, as well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.