Hi,
I am working with a 'maintenance' access program.
I have a form that logs the work done to various things. What I want to do is, when the user selects an equipment type from the Equipment combo box, the inventory combo box should automatically fill with all the inventory items that belong to that equipment type. Also, after changing a equipment type, the inventory combo box should again change to show all the inventory items from that type.
I tried doing this but nothing happens.
Private Sub Combo34_AfterUpdate()
cboInventoryID.RowSource = "SELECT DISTINCTROW tblInventory.inventoryID, tblInventory.equipID, " & _
"tblInventory.EquipmentIdentifier FROM tblInventory " & _
"WHERE (((tblInventory.equipID)=" & Combo34.Value
End Sub
Whats wrong with this code, OR is there a better way to do this?
I am working with a 'maintenance' access program.
I have a form that logs the work done to various things. What I want to do is, when the user selects an equipment type from the Equipment combo box, the inventory combo box should automatically fill with all the inventory items that belong to that equipment type. Also, after changing a equipment type, the inventory combo box should again change to show all the inventory items from that type.
I tried doing this but nothing happens.
Private Sub Combo34_AfterUpdate()
cboInventoryID.RowSource = "SELECT DISTINCTROW tblInventory.inventoryID, tblInventory.equipID, " & _
"tblInventory.EquipmentIdentifier FROM tblInventory " & _
"WHERE (((tblInventory.equipID)=" & Combo34.Value
End Sub
Whats wrong with this code, OR is there a better way to do this?