I am building a form that will display a lot of text boxes, each of which should display the result of a different query.
Here is example:
I have a query that calculates the sales from yesterday. It runs perfectly in the QBE grid but won't run from the text box. Here is the SQL;
SELECT Sum(dbo_Transaction_Table.ArAmt) AS SumOfArAmt
FROM dbo_Transaction_Table
WHERE (((dbo_Transaction_Table.Sku) Like "17*") AND ((dbo_Transaction_Table.Date_of_Transaction)=Date()-1));
In the Txt box control source I open the expression builder and build the following:
=[Form YTD Yestereday]![SumOfArAmt]
Form YTD Yesterday is the query name and SumOfAramnt is the result field.
I have tried adding " in various places but nothing works.
Help would be greatly appreciated.
Thanks in advance.
jpl
Here is example:
I have a query that calculates the sales from yesterday. It runs perfectly in the QBE grid but won't run from the text box. Here is the SQL;
SELECT Sum(dbo_Transaction_Table.ArAmt) AS SumOfArAmt
FROM dbo_Transaction_Table
WHERE (((dbo_Transaction_Table.Sku) Like "17*") AND ((dbo_Transaction_Table.Date_of_Transaction)=Date()-1));
In the Txt box control source I open the expression builder and build the following:
=[Form YTD Yestereday]![SumOfArAmt]
Form YTD Yesterday is the query name and SumOfAramnt is the result field.
I have tried adding " in various places but nothing works.
Help would be greatly appreciated.
Thanks in advance.
jpl