Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    2

    Question Unanswered: Drawing a line on a report based on a value in summary total.

    I have a report that gives the average caseload size for a particular county. Example:

    County A - 650.4
    County B - 625.3
    County C - 600.9
    County D - 585.6
    County E - 584.4 The field for this is "numCSLD"

    In the footer of the report is a field for the average of the caseloads, "avgCSLD".

    The average is 609.3. What I would like to do is draw a line between County B and County C. I was working with the following code but it puts a line after each county that is true to the criteria.

    If numCSLD > avgCSLD then
    Me.Line(0,Me.Section(0).Height)-Step(Me.Width,0)
    End If

    So what I would like to see is the following:

    County A - 650.4
    County B - 625.3
    ----------------- (This would be a solid line)
    County C - 600.9
    County D - 585.6
    County E - 584.4

    Any suggestions or ideas?

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Off hand the easiest way would be to requery your recordsource.
    Code:
    "SELECT MIN(numCLSD) FROM MyRecSource WHERE numCLSD > " & avgCSLD
    Pop in a variable and then:
    Code:
    If numCSLD = MyMinnumCLSD then
    Me.Line(0,Me.Section(0).Height)-Step(Me.Width,0)
    End If
    Otherwise.... get a clone of your recordset, filter out records < avgCLSD and sort. Get the first value.

    ????
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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