Linked combos between form and subform

Robert C

Registered User.
Local time
Today, 08:58
Joined
Mar 27, 2000
Messages
88
With the help of you guys on the forum, I have managed to set up a couple of linked combo boxes on my my form - frmOrders. I can select a product category and then select a list of relevant suppliers from a second combo box.

What I need to do now is select relevant products from a third combo box which this time is on a subform - sbfOrderDetails.

I have tried repeating what I did on the first scenario, but it doesn't seem to work.

Please can someone help out.

Thanks very much
 
You have to create a query for your combo box in the subform (on RowSource property). Remember to select the SupplierID field along with the productID and productname. Under criteria, set SupplierID to:
forms!MainForm!SupplierID
Remember to set the right control source, column count, and column width corectly for that combo box.
 
First, If you are relying on the values of both of the previous combo boxes, you will need to requery the second two combo boxes after you update the first and requery the third combo box after you update the second.

To requery a combo box on a subform, use this syntax:

forms!NameOfMainForm!NameOFSubformControl.form!ComboBox.requery

(note your will use the name of the subform control, not the name of the form that the subform control is bound to)

Also, if the selected supplier governs the relevant products, then you only need to use the results of the supplier combo box in your products combo. If both the product category and the supplier determine the relevant products, you will need to refer to each of those combo boxes in your products combo box.

Are your first two combo boxes (category and supplier)on the main form and the third (products) on the subform?

[This message has been edited by DML (edited 07-14-2000).]
 
DML

Thanks for the reply.

Yes, the Category and Supplier combos are on the main form and the Products are on the subform.

Actually, I only need the products to be dependent on the Category.

Thanks for your help.
 
So were you able to figure it out?
 
Not yet DML. I'm still trying. I'll post again if I run into trouble. Thanks for your help so far.

Rob
 

Users who are viewing this thread

Back
Top Bottom