I have a query that has around 30 fields in it, all of them calculations from other smaller queries. I created the large one so that there was one query to base a report off of rather than using subreports. When I try and use a text box in the report with the control source as:
There is no value returned. CDConcessionBuy should return 2153, CDConcessionSell should return 0 for a total of 2153. When I put the control source as being just CDConcessionBuy, i get the correct answer. I think this problem is because the query that is supposed to be returning 0 is returning a null (not the same as I have learned through these forums ;-)). Unfortunately, I dont know how to fix it. Here's the query it is pulling from:
Once again, I would like to have CDConcessionSell return a 0 instead of null if there is nothing to sum.
Thanks for your help!
Code:
=[CDConcessionBuy]+[CDConcessionSell]
Code:
SELECT Sum([Execution Price]) AS CDExecutionSell, Sum([Street Price]) AS CDStreetSell, Sum([Quantity]) AS CDQuantitySell, Sum(([Street Price]-[Execution Price])*[Quantity]*10) AS CDConcessionSell, Count([Execution Price]) AS CDTicketCountSell
FROM tbl_BLOTTER
WHERE ((([tbl_BLOTTER].[Type])="CD") And (([tbl_BLOTTER].[Trade Date])=[Forms]![frm_DAILYBLOTDATE]![cboStartDate]) And (([tbl_BLOTTER].[Firm])=0) And (([tbl_BLOTTER].[Buy/Sell])="Sell"));
Once again, I would like to have CDConcessionSell return a 0 instead of null if there is nothing to sum.
Thanks for your help!