I am struggling with this and going round in circles and was wondering if someone could point me in the right direction.
I have a query with fields (from same table tbl_Sales);
SalesLabourSale , SalesPartsSale, SalesAdmin, SalesCourier, Overpayment
WriteOff, Underpayment
I have tried to introduce an expression called TotalSDNI, that says;
TotalSDNI: [SalesLabourSale]+[SalesPartsSale]+[SalesCourier]+[SalesAdmin]+[OverPayment]-[Underpayment]-[WriteOff]
Which appears to calculate everything ok.
I have tried to create another query that looks at another query that sums all the InvoiceAmount fields (from a different table)
When I then try to create a new query with these two querys and create an expression called Outstanding , Outstanding: nz([SumOfInvoiceAmount])-[TotalSDNI]
This works fine if I do not put any criteria in it but as soon as I say <>0 then it says "you tried to execute a query that does not include the specified expression "not nz([SumOfInvoiceAmount])-[TotalSDNI]=0 as part of an aggregate function.
To say I am confused is an understatement!!!
Many thanks in anticipation....
I have a query with fields (from same table tbl_Sales);
SalesLabourSale , SalesPartsSale, SalesAdmin, SalesCourier, Overpayment
WriteOff, Underpayment
I have tried to introduce an expression called TotalSDNI, that says;
TotalSDNI: [SalesLabourSale]+[SalesPartsSale]+[SalesCourier]+[SalesAdmin]+[OverPayment]-[Underpayment]-[WriteOff]
Which appears to calculate everything ok.
I have tried to create another query that looks at another query that sums all the InvoiceAmount fields (from a different table)
When I then try to create a new query with these two querys and create an expression called Outstanding , Outstanding: nz([SumOfInvoiceAmount])-[TotalSDNI]
This works fine if I do not put any criteria in it but as soon as I say <>0 then it says "you tried to execute a query that does not include the specified expression "not nz([SumOfInvoiceAmount])-[TotalSDNI]=0 as part of an aggregate function.
To say I am confused is an understatement!!!
Many thanks in anticipation....