What would a default value do for you? If the subreport might not contain
any records, you should use:
=IIf(subrpt.Report.HasData, subrpt.Report.txtTotals, 0)
--
Duane Hookom
MS Access MVP
--
I have to calculate commission for different types of loans. The subreport has the information for all types of loans. The text box in the main report totals the number of loans e.g. the total of PM loans, RCES loans, HE loans etc. I then multiply the number of loans with constant to get total commission for different kinds of loans. If there are no PM loans in the subreport, it should have zero in the text box, so that commission for that particular kind is zero. That's where I want to put the default value of zero. It will fill it with the total of loans, if that kind of loans exist, or it will be zero. I can not use null because it is possible that there is a total absence of particular kind of loans, so there will be no rows or data if an agent doesn't book that kind. Is there any other way to do it? Please let me know. Thanks a lot.