No Record in Subreport

D

Don

I have a subreport in my main report. I have a text box in my mainreport
that returns the value of another text box in my subreport. When a record in
my main report does not have a linked record in my subreport, the text box in
my main report returns an Error.

How can I write the formula in the text box in my main report to give me 0
(zero) if there is no matching record in my subreport?

I used "IsNull" in an IIF statement, but it did not work. Any help would be
appreciated.
 
M

Marshall Barton

Don said:
I have a subreport in my main report. I have a text box in my mainreport
that returns the value of another text box in my subreport. When a record in
my main report does not have a linked record in my subreport, the text box in
my main report returns an Error.

How can I write the formula in the text box in my main report to give me 0
(zero) if there is no matching record in my subreport?


=IIf(subreport.Report.HasData, subreport.Report.textbox, 0)
 

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