Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    14

    Unanswered: Cascading Combos Again

    I know there is plenty of info out of there on how to do cascading combos, but im still sruggling! (Not just laziness), ive downloded sample databases but i guess i wont understand one until i have one working within my database.

    I need one that allows a product to be selected based upon the selection of a supplier. The combo is needed on frmMainForm.

    I have a table tbl uppliers with the Supplier ID and Name
    I then have a table tbl Product with the Product ID and Product Name against the Supplier ID

    Is this the correct structure? Will a cascading combo work from this structure?

    Ive attached it, if anyone can help it would be great!
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Re: Cascading Combos Again

    Originally posted by Jeff_Ford
    I know there is plenty of info out of there on how to do cascading combos, but im still sruggling! (Not just laziness), ive downloded sample databases but i guess i wont understand one until i have one working within my database.

    I need one that allows a product to be selected based upon the selection of a supplier. The combo is needed on frmMainForm.

    I have a table tbl uppliers with the Supplier ID and Name
    I then have a table tbl Product with the Product ID and Product Name against the Supplier ID

    Is this the correct structure? Will a cascading combo work from this structure?

    Ive attached it, if anyone can help it would be great!

    Attached you will find a solution.
    I made a new form (frmCascadingCombos) on which I put 2 combos.
    The first shows the supplier-info and the second shows product-info of the supplier which is selected in the first combo.

    How did I do this?

    First combo:
    Put it on the form and set tblSuppiers as rowsource.
    Make sure the column which stores the supplierID is used as bound column.

    Second combo:
    Put it on the form and set tblProducts as rowsource.
    In the properties-window of the second combo you modify the rowsource --> a querybuilder will appear.
    Select all the fields you want displayed in the combo.
    Also select the field SupplierID and in the criteria-box you write '= cmbSupplier.Value'.
    cmbSupplier.value will represent the value of the bound column of cmbSupplier (which in this case is the supplierID)

    On the event-tab of cmbSupplier, create a after-update-event.
    This event will requery cmbProduct every time you select an other supplier.

    Hope this will do.
    If not --> let us know.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •