We help IT Professionals succeed at work.
Get Started

cascading combo boxes - I'm missing something simple here!

agwalsh
agwalsh asked
on
80 Views
Last Modified: 2016-01-29
Hi Folks
I've been experimenting with cascading combo boxes and using this link as a reference.
http://www.access-programmers.co.uk/forums/showthread.php?t=223980&highlight=cascade

In the attached database (Frm_workcentre_only) , the first combobox (cbo_work_order_01) works fine. It just filters for the correct work orders for that work centre. However when I get to Work order 2, I want that combo box (which is based on Qry_cbo_workOrder_02 which is to exclude the choice made in cbo_work_order_01 does not exclude the choice.  For example if I choose 642642001 as my work centre number, I get three choices in WorkOrder1. If I choose 609120 in WorkOrder1, I want to have only the other two numbers available to me in Workorder2. Alas, I'm getting all three. As per the link above, this is what I have done...
In the AfterUpdate event of WorkOrder 1 I have entered the following code:
Private Sub cbo_work_order_01_AfterUpdate()
Me.cbo_work_order_02.Requery
Me.cbo_work_order_03 = Null
Me.cbo_work_order_04 = Null
Me.cbo_work_order_05 = Null
End Sub

In the AfterUpdate event of WorkOrder 2 I have entered the following code..
Private Sub cbo_work_order_02_AfterUpdate()
Me.cbo_work_order_03.Requery
Me.cbo_work_order_04 = Null
Me.cbo_work_order_05 = Null
End Sub

I keep feeling as though I am missing something really simple here and I  just need fresh eyes! If I can get this one working, I'll then have a way to get the other combo boxes working :-) thanks again
Workorder_database_vers_06.accdb
Comment
Watch Question
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This problem has been solved!
Unlock 3 Answers and 5 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE