calculate form control if one of them is blank

R

robertm600635

I have a report that has two subreports. On each subreport is a calculated
field. On the main report I have a textbox that adds the two calculated
fields together (basically...[SubReportCalc1]+[SubReportCalc1]). This works
fine unless one of the subreport fields are blank, this happens when there
was nothing to calculate. How can i get it to still calculate on the main
report correctly?
 
R

robertm600635

That was exactly what I needed...thank you.

Allen Browne said:
See:
Bring the total from a subreport onto a main report
at:
http://allenbrowne.com/casu-18.html

The article shows how to use the HasData property of the subreport to avoid
the error if the subreport has no data.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


robertm600635 said:
I have a report that has two subreports. On each subreport is a calculated
field. On the main report I have a textbox that adds the two calculated
fields together (basically...[SubReportCalc1]+[SubReportCalc1]). This
works
fine unless one of the subreport fields are blank, this happens when there
was nothing to calculate. How can i get it to still calculate on the main
report correctly?

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top