Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Posts
    157

    Unanswered: Hiding Details in a report

    I have an unbound form called [ReportsForm] on which there is an unbound combox box called [HidePPIDetail] (which has a value list of yes or no).

    I also have a report called [usysbFormPPIAtCommencementR]. This report gets its data from the [ClientDetails] table. The report is grouped by [PPI] (primary presenting issue) and lists the clients who presented by PPI. I also have a count [=Count([ClientID])] which counts the total number of people for each PPI.

    If I look at the Section_Detail properties of the report called [usysbFormPPIAtCommencementR], I can manually change the visible control to No. This gives me only the Totals.

    What I would like to do is get the user to select whether they want to hide the detail on the report by selecting yes or no on the [ReportsForm].
    Then in the [usysbFormPPIAtCommencementR] report's ???? OnOpen ???? event get it to display the report depending on what the user has chosen.

    Can anyone please give me some advice/code on this?

    thanks heaps in advance

    KD

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    This type of thing in the report's open event:

    Code:
      If Forms!frmTripSheetMain.chkSummary = True Then
        Me.Detail.Visible = False
      End If
    Paul

  3. #3
    Join Date
    May 2002
    Posts
    157

    Hiding Details in a Report

    Thank you so much, I really appreciate the help.
    The following ended up working perfectly:

    Private Sub Report_Open(Cancel As Integer)
    On Error GoTo Err_Report_Open

    If Forms!ReportsForm.HidePPIDetail = "Yes" Then
    Me.Detail.Visible = False
    End If

    Exit_Report_Open:
    Exit Sub

    Err_Report_Open:
    MsgBox Err.Description
    Resume Exit_Report_Open
    End Sub

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help Karen.
    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •