Try to replace the extended total expression with this (adjust for the field and query names):
=dSum("[AmountToSum]","[qrySource_for_rptMaintenanceDoneSubrpt]")+dSum("[AmountToSum]","[qrySource_for_rptMaterialsDoneSubrpt]") + dSum("[AmountToSum]","[qrySource_for_rptReservationsDoneSubrpt]")
Cheers,
I have replaced the source to this: =dSum("[Subtotal]","[qryMaintenanceInvoice]") and it worked fine. (This query does return results)
Then I added a second query which also returns results and it worked: =dSum("[Subtotal]","[qryMaintenanceInvoice]")+dSum("[TotalItemCost]","[qryMaterialsInvoice]")
Then I added a third query although this third query does not return results and the textbox is now blank: =dSum("[Subtotal]","[qryMaintenanceInvoice]")+dSum("[TotalItemCost]","[qryMaterialsInvoice]") + dSum("[Comission]","[qryReservationsInvoice]")
Then I added data so so qryReservations would return results and this worked.
Then I deleted data so qryMaterialsInvoice would not return any results and it failed again.
Then I added the Nz function and IT WORKED!!!! Yeeeeeeeeeeeeeessssssssss!!!
Many, many thanks!!!
Now, I see what we are doing here, bypassing the report data for the calculation and going directly to the query. In an effort to learn and not run into the same issue again, do you know why the first method would not work? Is it always best to go directly to the query in the case of reports? Is it an "order" thing, meaning that maybe the report is trying to add values that do not exist as maybe the subreport loads after the main report tries to make the calculation?
Many thanks again
mafhobb