Cascading Combo's

  • Thread starter Thread starter Steven P via AccessMonster.com
  • Start date Start date
S

Steven P via AccessMonster.com

I've searched for and found several links to my problem but something is
still amiss. I have a form with an option group to select a factory, also on
the form is a combo box with drop down for a machine selection. When I am in
form view the records are not updateable/locked. I can open the table which
holds the option group selection(number assigned), manually change it and my
combo box shows the correct machine list. The option and combo are tied to a
query, and control sources appear to be correct. My intentions are to select
a factory by option, the operator would be given the corresponding machine
list for that area. Upon selecting the machine it would then need to open the
input form for the associated data.
Thanks,
Steven
 
Hi Steven,

Any chance you could post the table structures and the query?
It would help to identify your problem

Thanks
 
Im making some assumptions here so my answer might not be totally correct for
your scenario but:

Both controls are combo boes and each has its own row source based on a
query.

So say the machinery combo box was using a query called 'FindLocalMachines'
you would want to make sure this query filters based on the option picked
from the factory box.
for example if the form is called FactoryForm and the factory list is called
FactoryList then you would have your query for the machinery box say
something like
select machinery
from machinery_T
where machinery.factory = forms![factoryform]![factorylist]

and you would have to have an OnClick sub for the factory list that basially
does something like:

Me![machinery].requery

to force a requery of this control. The results should filter accordingly.

I use this all the time, let me know if youre stuck.

Amit
 
Back
Top