I have a form with a combo box (sup_numbers_combo), which has a list of supplier numbers in it. (on a master form).
In a sub form, i then set the row source for a combo box (product_numbers_combo) to this:
SELECT [product_number] FROM Supply_link WHERE [Supply_link].[sup_number]=[FORMS]![myForm]![sup_numbers_combo];
Hence, "Sup_number" is a PK in Supplier and an FK in Supply_link.
I want the product_numbers combo to be filled with the values of product_number in Supply_link, where the sup_number is equal to the number selected on the form.
Im pretty sure I have the query correct. If I enter it as a query and then force it a value for: [FORMS]![myForm]![sup_numbers_combo], it works fine.
However, when I set it as the row source for "product_numbers_combo", "product_numbers_combo" is never populated with any values.
Can anyone help?
In a sub form, i then set the row source for a combo box (product_numbers_combo) to this:
SELECT [product_number] FROM Supply_link WHERE [Supply_link].[sup_number]=[FORMS]![myForm]![sup_numbers_combo];
Hence, "Sup_number" is a PK in Supplier and an FK in Supply_link.
I want the product_numbers combo to be filled with the values of product_number in Supply_link, where the sup_number is equal to the number selected on the form.
Im pretty sure I have the query correct. If I enter it as a query and then force it a value for: [FORMS]![myForm]![sup_numbers_combo], it works fine.
However, when I set it as the row source for "product_numbers_combo", "product_numbers_combo" is never populated with any values.
Can anyone help?