As Remu said in his answer, related tables will make this easier. However, if you have an end-to-end query with the name MyQuery, you can do the following to dynamically update the RowSource from MyComboOrListBoxwhen the value changes CompanyID_Control:
Private Sub CompanyID_Control_AfterUpdate()
Dim SQL As String, qdf AS DAO.QueryDef
Set qdf = CurrentDB.QueryDefs("MyQuery")
qdf.SQL = " SELECT x.companyid, x.companyname, x.productid " & _
" FROM x " & _
" WHERE x.CompanyID =" & Me.CompanyID_Control & _
" ORDER BY x.productid;"
Me.MyComboOrListBox.RowSource = "MyQuery"
End Sub
AfterUpdate CompanyID_Control:
[Event Procedure].
, Remou, AfterUpdate CompanyID_Control, combobox/listbox RowSource:
Private Sub CompanyID_Control_AfterUpdate()
Me.MyComboOrListBox.Requery
End Sub