I have found lots of information on cascading combos but none for this particular issue.
Basically when you have multiple rows where each row may need the second combo in the cascade to have a a different set of values.
In my case I have a table StockTypeList with columns StocktypeID, StocktypeText. Another table StockList, columns StockID, StockText, StocktypeID.
The form is bound to the table StockInventory with relevant fields StockInventoryId, StockTypeID, StockID.
StockInventoryID is auto numbered.
If I have multiple records in StockInventory I have the following problem:
When the Stock combo gets requeried in any row by changing the stock type then any other row that has a different stock type has the Stock combo emptied because it's value is not valid in the new stock list.
Example rowsource code and screenshot for reference:
Is there any way to requery only the combo for the current row?
Basically when you have multiple rows where each row may need the second combo in the cascade to have a a different set of values.
In my case I have a table StockTypeList with columns StocktypeID, StocktypeText. Another table StockList, columns StockID, StockText, StocktypeID.
The form is bound to the table StockInventory with relevant fields StockInventoryId, StockTypeID, StockID.
StockInventoryID is auto numbered.
If I have multiple records in StockInventory I have the following problem:
When the Stock combo gets requeried in any row by changing the stock type then any other row that has a different stock type has the Stock combo emptied because it's value is not valid in the new stock list.
Example rowsource code and screenshot for reference:
Code:
Me.cboStock.RowSource = "SELECT StockList.StockID, StockList.StockText
FROM StockList
WHERE StockList.StockTypeID = " & Me.cboStockType.Column(0) & "And StockList.IsActive=1 ORDER BY StockList.StockText;"
Is there any way to requery only the combo for the current row?