Share via

MS Access: make a selection in one drop-down menu auto-select in another drop-down menu

Anonymous
2021-05-24T16:28:37+00:00

Hi I have a form with a few drop-down menus and for one of them I’m trying to make it such that a certain selection in one drop-down will automatically make another selection in another drop-down menu on the same form.

Any ideas/tutorials on how to do this?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. HansV 462.6K Reputation points MVP Volunteer Moderator
    2021-05-24T16:56:53+00:00

    Create an After Update event procedure for the first dropdown. Here is the basic idea; you can adapt it for your situation.

    Private Sub ComboBox1_AfterUpdate()
        If Me.ComboBox1 = 3 Then
            Me.ComboBox2 = 5
        End If
    End Sub

    In this example, both combo boxes have a number field as bound column. If they have a text field as bound column:

    Private Sub ComboBox1_AfterUpdate()
        If Me.ComboBox1 = "Specific Value" Then
            Me.ComboBox2 = "Another Value"
        End If
    End Sub

    1 person found this answer helpful.
    0 comments No comments

Answer accepted by question author

  1. DBG 11,711 Reputation points Volunteer Moderator
    2021-05-24T16:51:41+00:00

    You could just assign the value to the dropdown using the AfterUpdate event of the first one. For example:

    If Me.FirstDropdown = 3 Then 'some value you want to check

        Me.SecondDropdownName = 1 'whatever value you want to assign

    End If

    Hope that helps...

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful