K
Ken Hudson
I am using Access 2007.
I have a form that gets is data from a table.
I have a control on that form that I want to get its value from a query
called qryTest:
SELECT Sum(tblWipIn.curWipCost) AS XXXTtl
FROM (tblPOs INNER JOIN tblWipDocIDs ON tblPOs.pkPoID = tblWipDocIDs.fkPoID)
INNER JOIN tblWipIn ON tblWipDocIDs.pkWipID = tblWipIn.fkWipID
WHERE (((tblPOs.pkPoID)=[Forms]![frmWipPosub]![pkPOID]));
The form control is named “Unused.†I used the expression builder for the
control source and got:
=nz([qryTest]![xxxTtl],0)
When I open the form, I get #Name? in the object.
In my web searches I found a string in which the author stated that you can
not use a query to populate a control unless it is bound to the form. I
should use Dsum or write a function.
Can someone validate that the query error can not be fixed?
I have a form that gets is data from a table.
I have a control on that form that I want to get its value from a query
called qryTest:
SELECT Sum(tblWipIn.curWipCost) AS XXXTtl
FROM (tblPOs INNER JOIN tblWipDocIDs ON tblPOs.pkPoID = tblWipDocIDs.fkPoID)
INNER JOIN tblWipIn ON tblWipDocIDs.pkWipID = tblWipIn.fkWipID
WHERE (((tblPOs.pkPoID)=[Forms]![frmWipPosub]![pkPOID]));
The form control is named “Unused.†I used the expression builder for the
control source and got:
=nz([qryTest]![xxxTtl],0)
When I open the form, I get #Name? in the object.
In my web searches I found a string in which the author stated that you can
not use a query to populate a control unless it is bound to the form. I
should use Dsum or write a function.
Can someone validate that the query error can not be fixed?