Avatar of agwalsh
agwalsh
 asked on

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

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
Microsoft Access

Avatar of undefined
Last Comment
agwalsh

8/22/2022 - Mon
SOLUTION
als315

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
PatHartman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
agwalsh

ASKER
hi Folks
This is my issue. I'm starting from a text file like the one attached. How can I set up this text file to feed into an Access database so the user can do the following. This will be pulled from another system.
1. Pick a workcentre number from a dropdown list
2. On the same form, the user can select a work order number (these are filtered to only show a work order number for that work centre.
3. The user picks the first work order number in a combo box e.g. Cbo01. Ideally, I'd like a text box beside that with a default entry of 1 - which shows it is the first choice.
2. They then choose a second workorder number from CBO02- these are now filtered so the choices EXCLUDE the choice made in Cbo01. Ideally, I'd like a text box beside that with a default entry of 2 - which shows it is the first choice.
3. They then choose a third workorder number - these are now filtered so the choices EXCLUDE the choice made in Cbo01 and CBO02. Ideally, I'd like a text box beside that with a default entry of 3 - which shows it is the first choice.  And so on for the next two choices - five choices in total. Then I also want a field that shows the date of posting and time of posting. This can be in the background. All these choices to then be added to another table. So this table shows the workcentre number, the workorder number, the choice number and the date of posting and time of posting. Thanks.
tbl_workorders_workcentre.txt
ASKER CERTIFIED SOLUTION
PatHartman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
agwalsh

ASKER
Well turns out now they've all changed their minds and want something else altogether.
@PatHartman - do appreciate the advice but apparently the way I have outlined was the way they wanted it...
Your help has saved me hundreds of hours of internet surfing.
fblack61