Avatar of João serras-pereira
João serras-pereira
Flag for Portugal asked on

ms/access dynamic source for dropdown control

Hi
On my app o have a 4 level table subtable set for a location: Region / Sector / Section / Base. I need to have the user selecting first the [Region] then, only the [Sector] for the selected [Region] should show on the dropdown [Sector] control, then only the [Section] set for the the selected [Region].[Sector] should show on the dropdown.
All the controls have specific proper names, e.g.  [frmfld_Region] for the dropdown control related to Region.
My question is: how do I do it? How do I ensure that the dropdown list is properly managed? (a simple tree as in datasheet view would do ... but I can't simple use it as I loose the "control" management.
VBA

Avatar of undefined
Last Comment
João serras-pereira

8/22/2022 - Mon
Fabrice Lambert

Hi,

you can use the BeforeUpdate event, to refresh or update the next dropdown lists.

This can be as simple as setting the rowSource property, to calling whatever function used to populate the dropdowns.
João serras-pereira

ASKER
Yeap... I was hoping that someone had the actual solution. The rowSource property is a query, as usual. But the query should be dependent on the values of higher level tables and this is precisely what I don't know how to....
ASKER CERTIFIED SOLUTION
Fabrice Lambert

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.
João serras-pereira

ASKER
thanks!!! great HELP!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck