Want to autofill a textbox with a choice of two words based on a combo box selection.
Combo1 selects an area and product name
Text1 has a product type.
The criteria is as such:
If the selection from Combo1 has the words "CDW" in it then Text1 should autofill with "Clorox"
If the selection from Combo1 has the words "AAG" in it then Text1 should autofill with "AAG"
There is no possibility for overlap.
Current code: Text1 always displays AAG only.
Code:
Private Sub cboCell_AfterUpdate()
If Me.cboCell.Value = "*CDW*" Then
Me.txtProduct.Value = "Clorox"
ElseIf Me.cboCell.Value = "*AAG*" Then
Me.txtProduct.Value = "AAG"
End If
End Sub