Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am programming 3 combo boxes so that each one feeds off the information from the previous combobox. For example, in the first box they would select a year, then the second combobox would provide specific events for that year and then the third combobox would provide specific maps that are available based on the the first two answers. I know the process is written in the Sub Change() location but I am stuck on how to relate them to each other. Can anyone possibly provide me some sample code for this procedure. Or maybe a website where I can go to learn how to write this kind of code. Any help would be great!!

share|improve this question

closed as off topic by Devdatta Tengshe, Mapperz Mar 15 '13 at 13:46

Questions on Geographic Information Systems Stack Exchange are expected to relate to geographic information systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Can you expand by what you are calling 'specific maps'? Are these map documents or a specific GIS layer? – artwork21 Feb 15 '13 at 19:51
stackoverflow material? – vinayan Mar 15 '13 at 13:05

So what you want to do is listen to the combobox selected change event and then test for the condition that you want and load the comboboxes of the other comboboxes. This should get you close:

Private Sub comboBox1_SelectedIndexChanged(sender As Object, e As EventArgs)
    'check the value
     If comboBox1.SelectedValue = "Value I am looking for" Then
        'load the combo box
        comboBox2.Items.Add("This is added!")
        comboBox2.Items.Add("Add this too")
    End If
End Sub

Private Sub comboBox2_SelectedIndexChanged(sender As Object, e As EventArgs)
        'check the value
    If comboBox2.SelectedValue = "Value I am looking for" Then
        'load the combo box
            comboBox3.Items.Add("This is added!")
            comboBox3.Items.Add("Add this too")
    End If
End Sub
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.