locked
empty field report caption RRS feed

  • Question

  • i' ve a field and when it is empty I don't want the field and caption not printed. that works well , but the caption is still taking space on my report , I can  not put the "can shrink" property

    Tuesday, June 14, 2016 6:49 AM

Answers

  • Give this a try...

    - Change the label that contains your caption to a textbox

    - Make the control source of that textbox something like this, including the = sign:

    = IIf("" & [YourField]="","","Your caption")

    That will check to see if there is any data in YourField.  If there is NO data, the textbox will display nothing.  If there IS data, your caption will be displayed.

    Call the textbox txtCaption.

    - Set the height of txtCaption and of the original textbox on your report to zero, and set the Can Grow property to Yes.  With those settings, the textboxes containing your data and caption will only show up if data is present.


    Miriam Bizup Access MVP

    • Marked as answer by tekoko10 Tuesday, June 14, 2016 2:07 PM
    Tuesday, June 14, 2016 9:28 AM