Microsoft Access
--
Questions
--
Followers
Top Experts
Have all my fields layed out in a report. I don't want the report to display them if they are either Null or have a value of Zero.
The report is driven off a relatively simple query build in the query designer.
Any clever ideas?
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
What are you currently showing for Null values?
Pete
FieldX:IIF([field]=0,Null,
This will require a chenge of the fieldnames on the report. Another option is to use conditional formatting and select for the [field] the fontcolor white when equal zero :-)
Nic;o)






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
For this a calculation like:
select NZ(field1)+NZ(field2)+NZ(f
can be used.
Nic;o)
WHERE Not IsNUll([FieldOne]) AND ([FieldOne]) <> 0
Steve
The problem is, I don't know where I would enter code like this on the report. If I put it in the reports properties, it says that I have entered an expression that has no value.
It should be something like
If Me.LPAuditResultDetail1 = "0" Then
Me.LPAuditResultDetail1.Vi
Else
Me.LPAuditResultDetail1.vi
End If

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
BTW - Is there a line I can put in that instead of setting the visible property to false that I can just tell it to not include the field at all? (To avoid unsightly gaps in the report.)
One option is however to make the control as small as possible and set the CanGrow property to "Yes"
Thus when all fields on a detail line are treated this way an empty line almost as "nothing"
Nic;o)






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Microsoft Access
--
Questions
--
Followers
Top Experts
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.