only print if there is data

M

mané_uk

Hi,
I have a form which displays customer details and a subform which display
comments. I've managed to do a report which print what I have in my form but
what I've been struggling is to make the subform to be printed ONLY if
there's information on it. As it was set up to not be shown with the form if
in blank I've tried to used directly in the report text box the "IIf" code
but it's not working. Any ideas please?
Many thanks
 
D

Duane Hookom

A subreport will only display if there are records in the subreport. If there
are no records, the subreport won't show.
 
M

mané_uk

How do I capture it into the report though? So it prints the information of
my main form and if no information on my subform it leaves its respective
text box space in the report in blank and if there's information in my
subform it fills in the text box in the report with the information?
Many thanks
 
D

Duane Hookom

You should be printing reports and subreports. What do you mean by "fills in
the text box in the report"? If this is actually a "text box", can you
provide the control source?

I seem to be getting more rather than less confused.
 
M

mané_uk

My report is formed of Unbound text boxes where I capture the information
from my form (and subform) to be used as a "printed header" in cases where
the work will have to be re-done later. So, it was happening that when I
didn't have the subform (as there were no data on it) my report would be
appearing "#name" or "#error" (I can't really remember now) but I've managed
to sort it out doing an IIF so, now, it tests if the result of trying to pull
data from the subform is "Error" it return a blank space otherwise enter the
information that I have in my subform.

Many thanks anyway for your help!!
Regards
Mané
 

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