I am having real problems with a cascading combo box, which I cannot get right.
There is a subform in my main form which lists and records the products on each job. This subform shows in datasheet view. Each line records the product, size extras and type. It is the type that should be a cascaded combo, bringing different options depending upon the product.
The tables which are fed by the form are:
tblProducts
ProductCode (PK)
Product
tblProductsInstalled
ProdInstalledID (PK)
Contract
ProductCode
Quantity
Sizes
Type
Extras
tblProductTypes
Type ID (PK)
ProductType
ProductCode
The form has the following fields:
Contract (bound to [Contract])
Quantity (bound to [tblProductsInstalled].[Quantity])
Sizes (bound to [tblProductsInstalled].[Sizes])
Product (bound to [tblProductsInstalled].[ProductCode] but selecting products from tblProducts)
Type (this is my problem field. It should bring up the list of Product Types depending upon the entry in the Product combo box)
Extras (bound to [tblProductsInstalled].[Extras])
This is my SQL for the Type combobox:
SELECT [Product Types].ID, [Product Types].[Product Type], [Products Installed].ProductCode
FROM [Products Installed] INNER JOIN [Product Types] ON ([Product Types].[Product Code] = [Products Installed].Product) AND ([Products Installed].ID = [Product Types].ProductsInstalledID)
WHERE ((([Products Installed].Product)=[Forms]![Products Installed]![Product]));
I just cannot get the results needed! Can anyone help as although I have looked at all other posts of this nature of the forum it will not work for me.
There is a subform in my main form which lists and records the products on each job. This subform shows in datasheet view. Each line records the product, size extras and type. It is the type that should be a cascaded combo, bringing different options depending upon the product.
The tables which are fed by the form are:
tblProducts
ProductCode (PK)
Product
tblProductsInstalled
ProdInstalledID (PK)
Contract
ProductCode
Quantity
Sizes
Type
Extras
tblProductTypes
Type ID (PK)
ProductType
ProductCode
The form has the following fields:
Contract (bound to [Contract])
Quantity (bound to [tblProductsInstalled].[Quantity])
Sizes (bound to [tblProductsInstalled].[Sizes])
Product (bound to [tblProductsInstalled].[ProductCode] but selecting products from tblProducts)
Type (this is my problem field. It should bring up the list of Product Types depending upon the entry in the Product combo box)
Extras (bound to [tblProductsInstalled].[Extras])
This is my SQL for the Type combobox:
SELECT [Product Types].ID, [Product Types].[Product Type], [Products Installed].ProductCode
FROM [Products Installed] INNER JOIN [Product Types] ON ([Product Types].[Product Code] = [Products Installed].Product) AND ([Products Installed].ID = [Product Types].ProductsInstalledID)
WHERE ((([Products Installed].Product)=[Forms]![Products Installed]![Product]));
I just cannot get the results needed! Can anyone help as although I have looked at all other posts of this nature of the forum it will not work for me.