RexACrouch


I will use a simple example.

You make your first drop-down box with the possible choices being RED, BLUE, or GREEN from Valid_Colors.

If the user choose BLUE in the first field and you want your next drop-down box in your second field to list Valid_Blue_Shades such as light blue, baby blue, navy blue, sky blue...) not Valid_Red_Shades.

How do you go about this IF, ELSE, ELSE senario to ensure the second field provides the appropriate selection from the first field

Rex

rexacrouch@hotmail.com





Re: Second Drop-Down Changing the Possilbe Entry Based on the Input of the First Drop-Down

Andy Pope


Hi,

You need to provide more detail about which application and what situation you want dependent lists.

For excel using data validation see Debra's page.
http://www.contextures.com/xlDataVal02.html






Re: Second Drop-Down Changing the Possilbe Entry Based on the Input of the First Drop-Down

ke wenzel

Hi Rex,

As Andy said, you need to be more specific, but this may help you.

The first drop-down box needs to have an event listener associated with it. Doing that is application-specific. In MS Access you can right click on the list (from the form design view), select properties, click on "On Change", then select "Code Builder" from the "..." options. In Excel you can just right click the list and select "View Code".

Either way, for a list named List1, it will create a subroutine named List1_Change(), which is triggered whenever the user changes the value of List1 during runtime. In that subroutine you can place code that updates the contents of the second list.

KW