Thanks for your help Allen
I'm still just wandering around in the dark here. I tried
putting the "IIF" in both the sub-report and the main
report with no success. If you would indulge me with a
little more of your time I going to be a little more
specific.
One of the two sub-reports are as follows.
A recordset is generated in VB and inserted in an Access
table.
All records if any are then presented in the detail
section of the sub-report at run time. All works
according to plan if there are records, if not #Error is
presented in the main report.
Sub-Report name = TmpPrtOrd
Fields = Qty, Rate, ExtPrice (and Text19 generated in
the sub-report)
Text19 is set to visible = no
The Control Source =([ExtPrice]} (running sum over group)
Report name = Invoice
#Error Textbox = Text16 and it is in the page footer of
the report.
Control Source =[TmpPrtOrd]![Text19]
I'm not sure if I'm writing the IIF correctly or if I'm
putting it in the right report. I assume it is the
Control Source for one of the texboxes.
Thanks again.
TK
-----Original Message-----
Read the HasData property of the report in the subreport control:
=IIf([MySub].[Report].[HasData], Nz([MySub].[Report]. [MyTextBox], 0), 0)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Hi:
I have a report with two subreports. A value from each
subreport is displayed on the main report. All is well if
there is a value in the subreports textbox. If not #Error
is displayed in the textboxes on the main report that
derive their value from the subreport. How can I clear
the #Error from the main reports textbox.. I have tried
IIf but can't read the textbox if no value is present.
Thanks TK
.