Results 1 to 5 of 5
  1. #1
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89

    Hide Report on Textbox Value

    Is it possible to hide an entire report if the value of a textbox is not null?

    I've thought of an If statement on the Open Report or maybe using Filter, but I don't even understand what one puts in the Filter.

    Any help is greatly appreciated! Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    You don't want a report to open if a specific data is encountered?

    Try using the report Open event. This event has a Cancel argument. If value present execute the cancel.

    If Not IsNull(fieldname) Then
    Cancel = True
    MsgBox "Report open canceled."
    End If
    Last edited by June7; 07-29-2011 at 11:16 AM.
    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
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    I think I want it to open. I just don't want it to show?
    It's a report for invoices... sometimes the same person has multiple invoices.
    But it's set up so each person's invoices are grouped together... so they get to see all of them.. but if they've paid already, i don't want that invoice to show.....

  4. #4
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    I got it :] I set the report's filter to: IsNull([Check #]).
    Thanks for your suggestion though! :]

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Glad you found your solution. Your original question was a bit misleading. Instead of hide report, you wanted to hide a record. As you discovered, the correct solution is to filter the data to exclude the record.
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 02-17-2011, 10:19 AM
  2. Conditionally hide detail row in report
    By martinjamesward in forum Reports
    Replies: 5
    Last Post: 09-06-2010, 02:51 AM
  3. Replies: 3
    Last Post: 08-13-2010, 11:23 PM
  4. Hide zero value in report and date syntax
    By Alex Motilal in forum Access
    Replies: 0
    Last Post: 11-16-2008, 09:11 AM
  5. Replies: 1
    Last Post: 12-06-2006, 05:32 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