R
ryan.fitzpatrick3
I have 3 comboboxes. The first one named cboxClass, which pulls from
tblClass table has a selection of items where when you select the
filtered choices should go into combobox2 named cboxCategories, which
pulls from tblCategories table. Then it does the same from cbox2 to
cbox3. Cbox3 is named cboxGroup because it pulls from tblGroup table.
Now I have this SQL code. I go into record source of cbox2 and link it
to cboxclass. The form name is frmsystemsreport.
SELECT tblCategories.CategoryID, tblCategories.CategoryName,
tblCategories.ClassID
FROM tblCategories
WHERE (((tblCategories.ClassID)=[Forms]![frmSystemsReport]!
[cboxClass]));
How do I get the filtered selection from cboxclass into
cboxcategories?
Also after this works, I have a query that runs a report. I put the
fields Class, categorie and group into the query and in the criteria I
link it to the combobox, so in the class field I link it to the
cboxclass and so on for the other two fields categorie and group. My
problem is that when I run the report it comes up with error#'s. How
do I fix. Here is the SQL
SELECT QrySSIMSAllitemswithAllVendors.CORP,
QrySSIMSAllitemswithAllVendors.DIVISION,
QrySSIMSAllitemswithAllVendors.FACILITY,
QrySSIMSAllitemswithAllVendors.DST_CNTR,
tblSSIMSItemNumbers.ItemNumber,
QrySSIMSAllitemswithAllVendors.CORP_ITEM_CD,
tblSSIMSItemNumbers.Class, tblSSIMSItemNumbers.Categorie,
tblSSIMSItemNumbers.Group, QrySSIMSAllitemswithAllVendors.DESC_ITEM,
QrySSIMSAllitemswithAllVendors.VEND_NUM,
QrySSIMSAllitemswithAllVendors.VEND_SUB_ACNT,
QrySSIMSAllitemswithAllVendors.NAME, [Qry(1c)POReceivings].AMT_RECV,
QrySSIMSAllitemswithAllVendors.SIZE_NUM,
QrySSIMSAllitemswithAllVendors.SIZE_UOM, IIf([SIZE_UOM]="OZ",
[SIZE_NUM]/16,[SIZE_NUM]) AS OZTOLBCONV,
QrySSIMSAllitemswithAllVendors.PACK_WHSE,
[AMT_RECV]*[PACK_WHSE]*[OZTOLBCONV] AS TOTALVOL,
QrySSIMSAllitemswithAllVendors.UNITCOST,
QrySSIMSAllitemswithAllVendors.PERUNITCOST, [PERUNITCOST]/[OZTOLBCONV]
AS LBPRICE, QrySSIMSAllitemswithAllVendors.COST_IB,
[LBPRICE]*[TOTALVOL] AS SPEND
FROM (tblSSIMSItemNumbers INNER JOIN QrySSIMSAllitemswithAllVendors ON
tblSSIMSItemNumbers.ItemNumber =
QrySSIMSAllitemswithAllVendors.CORP_ITEM_CD) INNER JOIN
[Qry(1c)POReceivings] ON (QrySSIMSAllitemswithAllVendors.CORP =
[Qry(1c)POReceivings].CORP) AND
(QrySSIMSAllitemswithAllVendors.DIVISION =
[Qry(1c)POReceivings].DIVISION) AND
(QrySSIMSAllitemswithAllVendors.FACILITY =
[Qry(1c)POReceivings].FACILITY) AND
(QrySSIMSAllitemswithAllVendors.CORP_ITEM_CD =
[Qry(1c)POReceivings].CORP_ITEM_CD)
WHERE (((QrySSIMSAllitemswithAllVendors.CORP)="001") AND
((tblSSIMSItemNumbers.Class)=[Forms]![frmSystemsReport]![cboxClass])
AND ((tblSSIMSItemNumbers.Categorie)=[Forms]![frmSystemsReport]!
[cboxCategories]) AND ((tblSSIMSItemNumbers.Group)=[Forms]!
[frmSystemsReport]![cboxgroup]) AND (([Qry(1c)POReceivings].DATE_RECV)
Between [Start Date:] And [End Date:]));
thanks in advance.
Ryan
tblClass table has a selection of items where when you select the
filtered choices should go into combobox2 named cboxCategories, which
pulls from tblCategories table. Then it does the same from cbox2 to
cbox3. Cbox3 is named cboxGroup because it pulls from tblGroup table.
Now I have this SQL code. I go into record source of cbox2 and link it
to cboxclass. The form name is frmsystemsreport.
SELECT tblCategories.CategoryID, tblCategories.CategoryName,
tblCategories.ClassID
FROM tblCategories
WHERE (((tblCategories.ClassID)=[Forms]![frmSystemsReport]!
[cboxClass]));
How do I get the filtered selection from cboxclass into
cboxcategories?
Also after this works, I have a query that runs a report. I put the
fields Class, categorie and group into the query and in the criteria I
link it to the combobox, so in the class field I link it to the
cboxclass and so on for the other two fields categorie and group. My
problem is that when I run the report it comes up with error#'s. How
do I fix. Here is the SQL
SELECT QrySSIMSAllitemswithAllVendors.CORP,
QrySSIMSAllitemswithAllVendors.DIVISION,
QrySSIMSAllitemswithAllVendors.FACILITY,
QrySSIMSAllitemswithAllVendors.DST_CNTR,
tblSSIMSItemNumbers.ItemNumber,
QrySSIMSAllitemswithAllVendors.CORP_ITEM_CD,
tblSSIMSItemNumbers.Class, tblSSIMSItemNumbers.Categorie,
tblSSIMSItemNumbers.Group, QrySSIMSAllitemswithAllVendors.DESC_ITEM,
QrySSIMSAllitemswithAllVendors.VEND_NUM,
QrySSIMSAllitemswithAllVendors.VEND_SUB_ACNT,
QrySSIMSAllitemswithAllVendors.NAME, [Qry(1c)POReceivings].AMT_RECV,
QrySSIMSAllitemswithAllVendors.SIZE_NUM,
QrySSIMSAllitemswithAllVendors.SIZE_UOM, IIf([SIZE_UOM]="OZ",
[SIZE_NUM]/16,[SIZE_NUM]) AS OZTOLBCONV,
QrySSIMSAllitemswithAllVendors.PACK_WHSE,
[AMT_RECV]*[PACK_WHSE]*[OZTOLBCONV] AS TOTALVOL,
QrySSIMSAllitemswithAllVendors.UNITCOST,
QrySSIMSAllitemswithAllVendors.PERUNITCOST, [PERUNITCOST]/[OZTOLBCONV]
AS LBPRICE, QrySSIMSAllitemswithAllVendors.COST_IB,
[LBPRICE]*[TOTALVOL] AS SPEND
FROM (tblSSIMSItemNumbers INNER JOIN QrySSIMSAllitemswithAllVendors ON
tblSSIMSItemNumbers.ItemNumber =
QrySSIMSAllitemswithAllVendors.CORP_ITEM_CD) INNER JOIN
[Qry(1c)POReceivings] ON (QrySSIMSAllitemswithAllVendors.CORP =
[Qry(1c)POReceivings].CORP) AND
(QrySSIMSAllitemswithAllVendors.DIVISION =
[Qry(1c)POReceivings].DIVISION) AND
(QrySSIMSAllitemswithAllVendors.FACILITY =
[Qry(1c)POReceivings].FACILITY) AND
(QrySSIMSAllitemswithAllVendors.CORP_ITEM_CD =
[Qry(1c)POReceivings].CORP_ITEM_CD)
WHERE (((QrySSIMSAllitemswithAllVendors.CORP)="001") AND
((tblSSIMSItemNumbers.Class)=[Forms]![frmSystemsReport]![cboxClass])
AND ((tblSSIMSItemNumbers.Categorie)=[Forms]![frmSystemsReport]!
[cboxCategories]) AND ((tblSSIMSItemNumbers.Group)=[Forms]!
[frmSystemsReport]![cboxgroup]) AND (([Qry(1c)POReceivings].DATE_RECV)
Between [Start Date:] And [End Date:]));
thanks in advance.
Ryan