Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2009
    Location
    Essex, United Kingdom
    Posts
    6

    Conditionally hide detail row in report

    I am attempting to hide the detail section of a report conditionally.

    I want to hide all rows where the field trn_DaysModified is less than or equal to the field rty_TargetDays (hide all records in target)

    My research suggest the following should work, but my report is still showing all rows (rows are also grouped by trn_DaysModified so i can count the number of records by trn_DaysModified)



    Code:
    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
        If Me.trn_DaysModified <= Me.rty_TargetDays Then
            Me.Detail.Visible = False
        Else
            Me.Detail.Visible = True
        End If
    End Sub
    Can someone please point out where I am going wrong?

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Maybe you can try to move the code to detail_format event.

  3. #3
    Join Date
    Aug 2009
    Location
    Essex, United Kingdom
    Posts
    6
    Have just tried that - still no joy

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Did you mean just filter away the rows which match you criteria and show the other rows? you should use a filter to do that.

  5. #5
    Join Date
    Apr 2010
    Posts
    21
    Sorry are you trying to make the detail section visible and not visible based on a value in teh detail section?

  6. #6
    Join Date
    Aug 2009
    Location
    Essex, United Kingdom
    Posts
    6
    What I am trying to do is hide a detail row if it passed a test

    i.e.
    if DaysModified is less than or equal to the TargetDays hide the row, otherwise show it.

    I am nee to write a report which says this many repairs complete (therfore all records are valid), grouped by day complete which only shows the detail of the repairs outside target but still includes those on target for summaries.

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

Similar Threads

  1. Report Width....Stacked Detail?
    By HRhodes in forum Access
    Replies: 1
    Last Post: 01-18-2010, 08:01 PM
  2. Sums in Detail area of report
    By Rick West in forum Reports
    Replies: 2
    Last Post: 12-01-2009, 07:15 PM
  3. Replies: 1
    Last Post: 10-11-2009, 08:31 PM
  4. report detail duplication
    By archie in forum Reports
    Replies: 5
    Last Post: 09-17-2009, 08:51 PM
  5. Space Between Header and Detail in Report
    By tigers in forum Reports
    Replies: 3
    Last Post: 06-23-2009, 12:01 AM

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