Results 1 to 3 of 3
  1. #1
    Juan1313 is offline Novice
    Windows 8 Access 2016
    Join Date
    Jun 2017
    Posts
    1

    How to condition Making Fields Visible in a Report

    Hi everybody

    Im new to this so i appreciate any help. I am working on a report that takes data from a Query but i only want fields in the report to be visible only if they have any value and are not empty, i would also like the labels beside to share the same condition. I'm pretty sure this is possible but i cannot figure out how to do it....


    Thanks in advance guys

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    If the field is empty the the data will be invisible anyway.
    but
    in the ON PRINT event, set:

    me.textbox.visible = not IsNull(me.textbox)

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    providing the label is bound to the value control, hiding the value control will also hide the associated label.

    If they are currently not linked, you can link them by

    in design view
    select the label
    use ctrl-X to delete it
    then select the control it is linked to
    and use ctrl-V


    in the report format event put

    me.mycontrolname.visible=not isnull(mycontrolname)


    the alternative is to use conditional formatting - which you will also need to use if the report is continuous

    conditional formatting cannot hide a control but can set the back and fore colours to the same as the section back colour (usually white). Also labels are not affected by conditional formatting so you cannot hide these

    for the value control it would be

    Field Value Is...equal to....Null

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Visible/Not Visible based on condition VBA
    By BLFOSTER in forum Programming
    Replies: 3
    Last Post: 07-15-2014, 01:29 PM
  2. Visible Fields in Report if field=x
    By chris.williams in forum Reports
    Replies: 8
    Last Post: 09-05-2012, 03:49 PM
  3. Report Fields Visible Based on Checkbox
    By ghillie30 in forum Access
    Replies: 2
    Last Post: 09-21-2011, 09:04 AM
  4. Report showing non-visible fields
    By AKQTS in forum Forms
    Replies: 2
    Last Post: 09-21-2010, 09:40 AM
  5. Making objects visible in a report
    By Lockrin in forum Reports
    Replies: 3
    Last Post: 04-12-2010, 07:06 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums