Similar dropdown but different

L

lots of questions

In Word 2003, I have a dropdown list with a number of 'action' codes. Each
action code in the dropdown has one or more (up to 20) subordinate applicable
'reason' codes.

I would like to allow the user to select from the Action dropdown and have
the list of applicable reason codes appear in another field - then allow the
user to select only one from the second list, which would then populate the
field. I have seen several ways of possibly creating this scenario - but
which would be the 'sweet spot', short and straight forward as possible?

Could the Select Case Method or PopulateField Method be manipulated to do
this?

My thanks and best regards
 
B

Bear

Lotsa:

I hope others answer this, as I'm self-taught and rely on the advice of
experts. But the way I'd approach this is...

Every time the value of List1 changes, I'd store that value in a variable
that is global to the form, then call another sub that clears then loads
List2, based on the value set in List1. Probably using a Select Case
structure.

You could probably do it more directly. You could probably access the value
of List1 from any other subroutine and not need the global variable. You
could probably load List2 in the List1_Change procedure.

You could also consider storing all the possible sets for List2 in an array,
in such a way that the index of List1 could be used to select the correct row
or column of the array to load, without testing or knowing what the text
value of List1 is. That would require that you document your "trick" very
well indeed, to spare the poor dumb sap that gets stuck with maintaining your
code (i.e. you).

Bear
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top