Results 1 to 3 of 3
  1. #1
    Robyn_P's Avatar
    Robyn_P is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2017
    Posts
    150

    Hide some or show all records subform based on check box

    Hello

    I have a form with a check box chkExculdeEac. If this is checked I want to hide any records on the report where the EAC flag (yes/no field in table) is set to true.



    I've put the following in the EAC criterior field in the reports datasource. It works fine if the check box is ticked but shows no records rather than all of them when when unchecked.

    [code] iif([forms]. [frmUpdateTC]. [chkExcludeEAC], false, "") [\code]

    What do I put in the true part of this statement to show all records?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I would not use dynamic parameter in query. I would build criteria in VBA and apply to report when opening.

    However, try:

    Like IIf([forms].[frmUpdateTC].[chkExcludeEAC], False, "*")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Robyn_P's Avatar
    Robyn_P is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2017
    Posts
    150
    You are a star. The "Like" worked. I would normally have used VBA but this is in a sub report of another report and I'm already using VBA to filter the main report. Thanks though, that's excellent

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

Similar Threads

  1. Show/Hide txt to password * on a form with a check box
    By d9pierce1 in forum Programming
    Replies: 4
    Last Post: 11-26-2018, 06:26 PM
  2. show/hide a picture based on value in table
    By dsmithe in forum Reports
    Replies: 5
    Last Post: 08-22-2018, 03:37 PM
  3. Show/Hide Fields based on criteria.
    By jtm013 in forum Queries
    Replies: 6
    Last Post: 08-14-2014, 08:05 AM
  4. Show/ hide image based on some field value
    By capitala in forum Reports
    Replies: 4
    Last Post: 04-06-2013, 10:56 AM
  5. Check-box to hide/show input fields
    By RapidFireGT in forum Forms
    Replies: 2
    Last Post: 12-05-2011, 05:55 PM

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