G
Guest
I've been trying to fill a combo box after another is being updated, but I
have been doing it unsuccessfully. I only have one table that includes two
fields named Item and Barcode. I have a form with two combo boxes with
rowsources coming from those two fields. That works fine, but when I select
something in one combo box, I can't get the other combo box to update from
that.
This is how I tried doing it:
Private Sub ItemName_AfterUpdate()
If Len(ItemName) > 0 Then
With Barcode
.RowSource = _
"SELECT Barcode " & _
"FROM Original WHERE Item = " & ItemName
.Requery
.SetFocus
.Dropdown
End With
End If
End Sub
ItemName and Barcode are my combo boxes names.
Chris
have been doing it unsuccessfully. I only have one table that includes two
fields named Item and Barcode. I have a form with two combo boxes with
rowsources coming from those two fields. That works fine, but when I select
something in one combo box, I can't get the other combo box to update from
that.
This is how I tried doing it:
Private Sub ItemName_AfterUpdate()
If Len(ItemName) > 0 Then
With Barcode
.RowSource = _
"SELECT Barcode " & _
"FROM Original WHERE Item = " & ItemName
.Requery
.SetFocus
.Dropdown
End With
End If
End Sub
ItemName and Barcode are my combo boxes names.
Chris