If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
how sum a column in the same query based in a criteria?
I have query named: "qry_WOProduced" and shows datas like this, but I would like a column to sum "QtyProd" by each "Work_OrderN" and show them in the column "TotalProdbyWO", can you please help? Work_OrderN QtyProd STD_Rate [TotalProdbyWO] 12545 10 STD-25 30 12545 20 STD-25 30 12548 12 STD-25 24 12548 12 STD-25 24 12545 10 STD-25 10 Thanks LD -- Lorenzo DÃ*az Cad Technician |
#2
|
|||
|
|||
how sum a column in the same query based in a criteria?
A simple totals query
Work_OrderN - Group By QtyProd - GroupBy STD_Rate - GroupBy TotalProdbyWO - Sum - This would be a calculated field tha would be nothing more that a repeatition of QtyProd (If I understand your request correctly) "ldiaz" wrote in message ... I have query named: "qry_WOProduced" and shows datas like this, but I would like a column to sum "QtyProd" by each "Work_OrderN" and show them in the column "TotalProdbyWO", can you please help? Work_OrderN QtyProd STD_Rate [TotalProdbyWO] 12545 10 STD-25 30 12545 20 STD-25 30 12548 12 STD-25 24 12548 12 STD-25 24 12545 10 STD-25 10 Thanks LD -- Lorenzo Díaz Cad Technician |
#3
|
|||
|
|||
how sum a column in the same query based in a criteria?
that does not work because I'm using that query linked to a subform for data
entry.. could you please help please. -- Lorenzo DÃ*az Cad Technician "Klatuu" wrote: A simple totals query Work_OrderN - Group By QtyProd - GroupBy STD_Rate - GroupBy TotalProdbyWO - Sum - This would be a calculated field tha would be nothing more that a repeatition of QtyProd (If I understand your request correctly) "ldiaz" wrote in message ... I have query named: "qry_WOProduced" and shows datas like this, but I would like a column to sum "QtyProd" by each "Work_OrderN" and show them in the column "TotalProdbyWO", can you please help? Work_OrderN QtyProd STD_Rate [TotalProdbyWO] 12545 10 STD-25 30 12545 20 STD-25 30 12548 12 STD-25 24 12548 12 STD-25 24 12545 10 STD-25 10 Thanks LD -- Lorenzo DÃ*az Cad Technician |
#4
|
|||
|
|||
how sum a column in the same query based in a criteria?
Lorenzo:
Surprising as it may seem, it is possible to refer to the same query in a DSum function call in the query. In query design view put the following (all as one line) in the 'field' row of a blank column: TotalProdbyWOSum("QtyProd", "qry_WOProduced", "Work_OrderN = " & [Work_OrderN]) That assumes Work_OrderN is a number data type, If its text data type use: TotalProdbyWOSum("QtyProd", "qry_WOProduced", "Work_OrderN = """ & [Work_OrderN] & """") Ken Sheridan Stafford, England "ldiaz" wrote: that does not work because I'm using that query linked to a subform for data entry.. could you please help please. -- Lorenzo DÃ*az Cad Technician "Klatuu" wrote: A simple totals query Work_OrderN - Group By QtyProd - GroupBy STD_Rate - GroupBy TotalProdbyWO - Sum - This would be a calculated field tha would be nothing more that a repeatition of QtyProd (If I understand your request correctly) "ldiaz" wrote in message ... I have query named: "qry_WOProduced" and shows datas like this, but I would like a column to sum "QtyProd" by each "Work_OrderN" and show them in the column "TotalProdbyWO", can you please help? Work_OrderN QtyProd STD_Rate [TotalProdbyWO] 12545 10 STD-25 30 12545 20 STD-25 30 12548 12 STD-25 24 12548 12 STD-25 24 12545 10 STD-25 10 Thanks LD -- Lorenzo DÃ*az Cad Technician |
#5
|
|||
|
|||
how sum a column in the same query based in a criteria?
that works fine.. Thanks Ken. -- Lorenzo DÃ*az Cad Technician "Ken Sheridan" wrote: Lorenzo: Surprising as it may seem, it is possible to refer to the same query in a DSum function call in the query. In query design view put the following (all as one line) in the 'field' row of a blank column: TotalProdbyWOSum("QtyProd", "qry_WOProduced", "Work_OrderN = " & [Work_OrderN]) That assumes Work_OrderN is a number data type, If its text data type use: TotalProdbyWOSum("QtyProd", "qry_WOProduced", "Work_OrderN = """ & [Work_OrderN] & """") Ken Sheridan Stafford, England "ldiaz" wrote: that does not work because I'm using that query linked to a subform for data entry.. could you please help please. -- Lorenzo DÃ*az Cad Technician "Klatuu" wrote: A simple totals query Work_OrderN - Group By QtyProd - GroupBy STD_Rate - GroupBy TotalProdbyWO - Sum - This would be a calculated field tha would be nothing more that a repeatition of QtyProd (If I understand your request correctly) "ldiaz" wrote in message ... I have query named: "qry_WOProduced" and shows datas like this, but I would like a column to sum "QtyProd" by each "Work_OrderN" and show them in the column "TotalProdbyWO", can you please help? Work_OrderN QtyProd STD_Rate [TotalProdbyWO] 12545 10 STD-25 30 12545 20 STD-25 30 12548 12 STD-25 24 12548 12 STD-25 24 12545 10 STD-25 10 Thanks LD -- Lorenzo DÃ*az Cad Technician |
Thread Tools | |
Display Modes | |
|
|