How to Make Column Name Disappear if no values in column

D

doyle60

I have a sub report with a detail section for the data and a
groupheader section for the column names. What would be the code if I
want the name of the column to disappear if the column has null values
for all the records?

The Child/Master Field: PO
The Label with the Name of Column: ArticleLbl
The Field: Article
Record Source: OrderDetailsNonZeroqry

I know how to do it if I build a query first that simply returns only
those POs with a non-null article number. I could then use some code
I already have. But I want to avoid building that query.

Thanks,

Matt
 
A

Allen Browne

Right-click the label, and Change To | Text Box.

Now try setting its Control Source to something like:
=IIf(Count([Article]) = 0, Null, "Whatever")

The Null values are not counted, so that should work.
 

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