Results 1 to 5 of 5
  1. #1
    Stylianos is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2018
    Posts
    9

    Command/Toggle to Hide Detail while in Report View

    Hello,


    I have made countless attempts with code copied and modified from Google but have reached my limit. I am trying to add a command button or Toggle to the top of the Report (rptProductionReportDetail) while it is in Report View. I can always just open the Layout View and select the "Hide Detail" button but would like to make it easier for my end users. I was adding code to the detail section of the report but could not get it to work... Any ideas? Many thanks!!!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try this behind the button:

    Me.Detail.Visible = Not Me.Detail.Visible
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Post your code for analysis. Following works for me:


    Private Sub Command56_Click()
    Me.Detail.Visible = Not Me.Detail.Visible
    End Sub


    What do you mean by 'added to the detail section'? Code is just a button Click event behind report.


    And I was researching toggle button while pbaldy posted. Toggle button was not working nicely.
    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.

  4. #4
    Stylianos is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2018
    Posts
    9
    It Works!!! I was opening the Detail Section of the Report and inserting the Event Procedure there! ... I goofed big time!!! I took a Google Post a bit to literally! Many Thanks June7 and PBaldy!! Much Appreciated!!!

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Hide Detail In A Report
    By Derrick T. Davidson in forum Programming
    Replies: 2
    Last Post: 01-29-2016, 02:02 AM
  2. Replies: 6
    Last Post: 12-14-2015, 03:25 PM
  3. Making a toggle button hide a text box.
    By RemonKoybito in forum Forms
    Replies: 3
    Last Post: 05-20-2011, 11:34 AM
  4. Conditionally hide detail row in report
    By martinjamesward in forum Reports
    Replies: 5
    Last Post: 09-06-2010, 02:51 AM
  5. Replies: 1
    Last Post: 10-11-2009, 08:31 PM

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