Hi
I'm trying to update a combobox(called TypeCombo) list values after I select a value in another Combobox(called manCombo). The values for both Combobox comes from the table called EquipmentTable. Which has 3 fields Manufacturer, Type and Model.
I know that the value I select in ManCombo is being passed into the DLookup but TypeCombo.Value always equals Null. Is this because the Dlookup returns multiple values and if so should the code be something like
Any advice would be greatly appreciated
ComboBox value updates another combo box
I'm trying to update a combobox(called TypeCombo) list values after I select a value in another Combobox(called manCombo). The values for both Combobox comes from the table called EquipmentTable. Which has 3 fields Manufacturer, Type and Model.
Code:
Private Sub ManCombo_AfterUpdate()
Me.TypeCombo.Value = DLookup("[Type]", "EquipmentTable", "Manufacturer = " & Me.ManCombo.Value)
End Sub
Code:
Private Sub ManCombo_AfterUpdate()
Me.TypeCombo.List = DLookup("[Type]", "EquipmentTable", "Manufacturer = " & Me.ManCombo.Value)
End Sub
0 commentaires:
Enregistrer un commentaire