0
votes

I have two combo boxes each with different drop down items

Combo box 1: New, Sold, Retired Combo box 2: Unallocated, Retired, Reworked, Shipped

I want it so when the user selects New or Retired from comobo box one those corresponding values show up in combo box two.

I used the on click sub for combo box 1

If Me.combox1.Value = "New" Then
Me.combox2.Value = "Unallocated"
End If

If Me.combox1.Value ="Retired" Then
Me.combox2.Value = "Retired"
End If

I don't need the two boxes to be synchronized for all the values just those two.

I am just learning VBA code for access, so i am unsure of the best way to make this happen.

1
I'm not familiar with Access forms, but your code looks reasonable. What is the problem with it?djikay

1 Answers

0
votes
If Me.combox1.Value = "New" Then
Me.combox2.Value = "Unallocated"
ElseIf Me.combox1.Value ="Retired" Then
Me.combox2.Value = "Retired"
Else
'do nothing
End If