Designing Outlook form

Jay Carax
Jay Carax used Ask the Experts™

I have two drop down menus, one called 'Floor' and the other called 'Area'. I want it so that when I select a type of floor, it will dynamically update the area drop down with relevant items. Can someone please show me how to link them?

An example would be

Values =   Basement, Ground

If Floor = Basement    

then values in Area should only display:  Bike Store, Kitchen, Boiler Room

If Floor = Ground
then values in Area should only display: Reception, Lift Lobby, Library

Please see attachment for a basic visual.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This link takes you through the entire process. Hope it helps!

In the code, remove the lines that start with # as these are my comments explaining the code.

#You need to first create a subroutine to look for changes to values on the form
Sub Item_CustomPropertyChange(ByVal MyProperty)

#Next, you need to specify what page. In your screenshot you are use P.2
Set MyPage = Item.GetInspector.ModifiedFormPages.Add("P.2")

         #Now use the Select Case statement so you can specify which property to look for changes on
         Select Case MyProperty

         #Assuming you named the floor drop-down "floor"
       Case "Floor"
                    #If the value of Floor is changed, you want to set the possible values of Area
                    #To do that we use the case statement again
                    Select Case  Item.UserProperties.Find("Floor").Value

                    #If Floor equals "Basement"
                    Case "Basement"
                    #Set the possible values of "Area"
                    MyPage.Controls("Area").PossibleValues = "Bike Store;Kitchen;Boiler Room"

                    #If Floor equals "Ground"
                     MyPage.Controls("Area").PossibleValues = "Reception;Lift Lobby;Library"

                    End Select
          End Select
End Sub



Thanks - I will take a look at these now.
I just noticed a mistake. insert the line:

Case "Ground:


#If Floor equals "Ground"



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial