Access Report - How do you hide 'null' data and labels?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jennytranxxx
    New Member
    • May 2012
    • 8

    Access Report - How do you hide 'null' data and labels?

    I am designing a number of reports for my system and have used the following method for when there is no data in particular fields:
    Label is called UNPAID TIME
    Change the label to - Textbox
    Textbox Control Source type in: =IIf([UNPAID TIME] Is Null, Null, "UNPAID TIME")

    When I used this method, the Textbox disappears even when there is data in the field. Am I doing something wrong here?
    Also, is there any way to hide the backcolour of the textbox/label when there is null values?

    Thankyou
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    I would change the query the repost is based on to hold the resultfield like:
    Code:
    SELECT IIF(LEN(NZ([UNPAID TIME]))>0, "UNPAID TIME",NULL) as UnpaidText, ....
    It's possible that an empty field contains an empty string instead of NULL, thus the above test will capture both situations.

    Now you can use the field UnpaidText in your report.

    Comment

    Working...