My suggestion had a dot before HasData
=iif([SubreportName.Report.HasData, SubreportName.Report.fieldname,0)
--
Duane Hookom
MS Access MVP
The subreport is not in the same section as the text box - I have
checked the names and they are not the same.
What I have right now is:
=iif([SubreportName.Report!HasData,SubreportName.Report.fieldname,0)
Works fine if the value is not zero, if it's zero I get the error
message.
?????
Thx,
Is the subreport in the same section of the report as your text box?
Make sure the name of the text box on the main report is not also the
name of a field in the report's record source.
--
Duane Hookom
MS Access MVP
I have tried:
=IIf(subRptName!Report.HasData, subRptName.Report.txtTotal, 0)
that and I got a #Name error
I want to the value of a field returned that is in the footer of the
subreport....so instead I tried:
=IIF(subRptName!Report.HasData,subRptName.Report!FieldName, 0) - this
doesn't work - I'm new to VB so I'm sure I'm missing something
simple - at least I hope so....
Much thanks...
If it is possible that the subreport returns no records then you
need to use something like:
=IIf(subRptName!Report.HasData, subRptName.Report.txtTotal, 0)
--
Duane Hookom
MS Access MVP
I have inserted a unbound text box in a group footer of a report.
The formula is to pull up a value from a subreport. It works fine
except when the value is zero or blank, I get the #Error.
I tried including an IIF and it makes no difference.
I'm sure it's something simple that I'm just not thinking of....
Thx