G
Guest
I have a query that sums time for various operations say FORM, PRESS, MILL.
From an old FOX-Pro database, this is fine.
The problem is that I want to fetch this summed data into a text box on a
form.
I can open the form & query at the same time then copy & paste this data
across but this is tedious to say the least anyone any Ideas as to hw I can
automate this???
I thought of using dlookup but don’t seem to be able to figure out how to
sum on a group using this function?
Here is the query
THIS IS MASTER QUERY used in sum query
SELECT m_wml.pstk, m_wml.line, m_wml.mc, m_wml.setup, m_wml.runt,
m_wml.ml_trans, m_wml.ml_runper, m_wmach.machrate,
([setup]/Forms!frmquoteform!QTY)+([runt]/[ml_runper]) AS [Unit Time], ([Unit
Time]*[machrate])/100 AS [Unit Cost]
FROM m_wml INNER JOIN m_wmach ON m_wml.mc = m_wmach.machcode
GROUP BY m_wml.pstk, m_wml.line, m_wml.mc, m_wml.setup, m_wml.runt,
m_wml.ml_trans, m_wml.ml_runper, m_wmach.machrate
HAVING (((m_wml.pstk)=[Forms]![frmquoteform]![txtPSTK]));
THIS IS SUM QUERY that I copy the data from & paste it into the text bog on
the form.
SELECT DISTINCTROW QRY_Part_No_OPs.mc, Sum(QRY_Part_No_OPs.[Unit Time]) AS
[Sum Of Unit Time]
FROM QRY_Part_No_OPs
GROUP BY QRY_Part_No_OPs.mc
HAVING (((QRY_Part_No_OPs.mc)="FORM"));
From an old FOX-Pro database, this is fine.
The problem is that I want to fetch this summed data into a text box on a
form.
I can open the form & query at the same time then copy & paste this data
across but this is tedious to say the least anyone any Ideas as to hw I can
automate this???
I thought of using dlookup but don’t seem to be able to figure out how to
sum on a group using this function?
Here is the query
THIS IS MASTER QUERY used in sum query
SELECT m_wml.pstk, m_wml.line, m_wml.mc, m_wml.setup, m_wml.runt,
m_wml.ml_trans, m_wml.ml_runper, m_wmach.machrate,
([setup]/Forms!frmquoteform!QTY)+([runt]/[ml_runper]) AS [Unit Time], ([Unit
Time]*[machrate])/100 AS [Unit Cost]
FROM m_wml INNER JOIN m_wmach ON m_wml.mc = m_wmach.machcode
GROUP BY m_wml.pstk, m_wml.line, m_wml.mc, m_wml.setup, m_wml.runt,
m_wml.ml_trans, m_wml.ml_runper, m_wmach.machrate
HAVING (((m_wml.pstk)=[Forms]![frmquoteform]![txtPSTK]));
THIS IS SUM QUERY that I copy the data from & paste it into the text bog on
the form.
SELECT DISTINCTROW QRY_Part_No_OPs.mc, Sum(QRY_Part_No_OPs.[Unit Time]) AS
[Sum Of Unit Time]
FROM QRY_Part_No_OPs
GROUP BY QRY_Part_No_OPs.mc
HAVING (((QRY_Part_No_OPs.mc)="FORM"));