P
Philip Middleton
Access 2003 / WinXP Pro SP2
I cant quite seem to get this right.
I have 2 combo boxes in a subform.
The first combo [Prod_Cat] simply select from a list of Categories. Works
fine.
The second Combo [Prod_No] selects from a table, limiting the selection
based on 2 things.
First, a value on the parent form ( [forms]![Orders]![Price_Level_ID]).
this works fine.
Second, the value in the frist combo box on the same subform. This I cant
get to work.
I cant seem to find the exact method of refering to a field in a subform.
The SQL in the RowSource for the second combo is;
SELECT Prices.Prod_No, Stock.Prod_Name, Prices.Price, Prices.TaxFree FROM
Prices INNER JOIN Stock ON Prices.Prod_No = Stock.Prod_No WHERE
(((Prices.Price_Level_ID)=[Forms]![Order]![Price_Level_ID]) AND
((Stock.Prod_Cat)=[Forms]![Order]![Order_Items_Subform]![Prod_Cat])) ORDER
BY Prices.Prod_No;
The part in question is;
[Forms]![Order]![Order_Items_Subform]![Prod_Cat]
this is evidently not the connect format for refering to a field [Prod_Cat]
in a subform called [Order_Items_Subform] in a form called [Orders]
I have tried some veriations on this format, like
[Forms]![Order]![Order_Items_Subform].[form]![Prod_Cat] but I havnt quite
got it right because when I try use the second combo box, Access asks me for
the value directly.
What am I doing wrong?
Thanks...Philip Middleton
I cant quite seem to get this right.
I have 2 combo boxes in a subform.
The first combo [Prod_Cat] simply select from a list of Categories. Works
fine.
The second Combo [Prod_No] selects from a table, limiting the selection
based on 2 things.
First, a value on the parent form ( [forms]![Orders]![Price_Level_ID]).
this works fine.
Second, the value in the frist combo box on the same subform. This I cant
get to work.
I cant seem to find the exact method of refering to a field in a subform.
The SQL in the RowSource for the second combo is;
SELECT Prices.Prod_No, Stock.Prod_Name, Prices.Price, Prices.TaxFree FROM
Prices INNER JOIN Stock ON Prices.Prod_No = Stock.Prod_No WHERE
(((Prices.Price_Level_ID)=[Forms]![Order]![Price_Level_ID]) AND
((Stock.Prod_Cat)=[Forms]![Order]![Order_Items_Subform]![Prod_Cat])) ORDER
BY Prices.Prod_No;
The part in question is;
[Forms]![Order]![Order_Items_Subform]![Prod_Cat]
this is evidently not the connect format for refering to a field [Prod_Cat]
in a subform called [Order_Items_Subform] in a form called [Orders]
I have tried some veriations on this format, like
[Forms]![Order]![Order_Items_Subform].[form]![Prod_Cat] but I havnt quite
got it right because when I try use the second combo box, Access asks me for
the value directly.
What am I doing wrong?
Thanks...Philip Middleton