Solved Combobox in a child form

cmb_units filters for unit_tier = 1. If you want this combobox list to be conditional on item_id, then need to change the RowSource to reference cmb_items for criteria and code to Requery cmb_units.

SELECT T_units.[unit_ID], T_units.[unit], T_units.[unit_tier] FROM T_units WHERE t_units.unit_tier = [cmb_items].Column(2);

Private Sub cmb_units_GotFocus()
Me.cmb_units.Requery
End Sub

Cascading/Conditional combobox is a common topic. Review https://stackoverflow.com/questions...ous-form-the-second-combo-doesnt-show-its-val

For some reason your form is not cooperating with the Requery command. So instead:

SELECT T_units.[unit_ID], T_units.[unit], T_units.[unit_tier] FROM T_units;

Private Sub cmb_units_GotFocus()
Me.cmb_units.RowSource = "SELECT [unit_ID], [unit], [unit_tier] FROM T_units WHERE unit_tier = " & Me.cmb_items.Column(2) & "; "
End Sub
Thank you so much for your help.
I will use your solution to fix the issue and learn more about it.
 

Users who are viewing this thread

Back
Top Bottom