Form/Subform - update controls HELP!

T

TriX

Hello all,
I'm in the process of creating an inventory database and have
encountered a significant road block.
I have a form/subform problem where I have a combo box called
"Supplier" on the main form, and I have products (combobox) in the
subform.
I'm trying to get ONLY the products of the selected supplier (in the
main form) to show in the combobox of products in the subform.
I was able to accomplish this (update products based on supplier),
within the same form, but cannot accomplish this when dealing with a
form/subform.
I'm not too familiar with VB or SQL code, so please help solve my
problem step by step !!! :)
Thanks so much.
 
P

Pat Hartman\(MVP\)

Change the RecordSource query of the subform so that it references the combo
on the main form for selection criteria:

Select ... From YourTable
Where SupplierID = Forms!YourForm!SupplierID;
 
T

TriX

Ok, so to clarify...
I select my control in the sub-form, right click and for row source, I
direct it to the table it's related to (the "Select ... From YourTable"
part) and following that i type "Where SupplierID =
Forms!"YourForm"!SupplierID;


I'm not on the computer where the database is stored right now, but if
that is the solution I'm going to be VERY happy because it's been a
problem now for a while.
Thank you, and i'll post back to tell you if it works or not.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top