Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding the values

Status
Not open for further replies.

teqtaq

Technical User
Nov 18, 2007
197
US
I have a design issue.
My Report has subreports.
Subreport need to have additional field that will only show when there is a data.
What is the best way to handle this having in mind that headers will have to be appearing only if data is present as well.

Headers and text fields displaying the data. Based on Crosstab query made into a table.
So when crosstab query is pulling NULL values - it looks like: <> FT PT
There shouldn't be any <>.
But we can not be losing these records so we have decided to display them in UNKNOWN field.
We are hoping that people are going to enter data properly and UNKNOWN field will be having no values but IF there is one - we can't lose it - we need to have it counted.
So it is simple Headers:
ID, Name, SumOfFTPT<>, FT, PT,UNKNOWN.

Nothing complicated except hiding it part.
Can I do If NULL then "" and same for the Headers?
 
Have you tried, in the onformat event

If IsNull(MyColumn) Then
MyCoulumn.Visible = False
Else
MyColumn.Visible = True
end if

But, since Null is not a printable characters, not sure what difference it will make visually, except the heading will be hidden, but if it is a tabular report, is this appropriate?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I agree, thanks.
I souldn't worry about values but Headers shoul be hidden when values are NULL.
Thanks
 
This question might be more appropriate in the Reports forum.

If I understand correctly, you have a field/column in your report's record source that might contain only null values. If all of the values are Null then you want to hide the label that is the column header.

Assuming the "label" is in a report or group header, you should be able to change it to a text box and set its control source to something like:
[tt][blue]=IIf(Count([UNKNOWN]) = 0 , Null, "UNKNOWN")[/blue][/tt]

Duane
Hook'D on Access
MS Access MVP
 
Hi! Thanks dhookom!
With little twist it is working so far.
THANKS so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top