Results 1 to 8 of 8

Thread: Access Reports

  1. #1
    Join Date
    Oct 2011
    Posts
    71

    Unanswered: Access Reports

    I hope this isn't a hopeless cause. I am attempting to develop a report for a customer. Instead of the normal, "lets put all of the counts at the bottom of the report," they want the counts at the top of the report.

    I have attempted to increment a text box in the report header, using the "on format" event. A msgbox showed the if statment was fireing, but it would not update the control. From what I have seen in the past the detail portion of a report is very picky about updating anything outside of it.

    Is there a way to do this? I'm sure its pretty simple and might possibly involve using a subform/subreport, though I have never used either of those. So I am not sure where their place is to be used.

    Thanks in advance for your time and patience with me!

  2. #2
    Join Date
    Nov 2011
    Posts
    413
    Why not hide your report detail fields (where your totals now are I assume)and just put your fields on the report at the top and use your footer details as the source?

  3. #3
    Join Date
    Oct 2011
    Posts
    71
    I am able to do that for the overall total. However, what I am also needing at the top are the group count totals. Such as: 18 Completed Reports, 5 Open Reports, 3 Pending Reports. Using the group headers/footers, I have thouse counts individual. However, I am unaware of how to pull each specific count out.

    I have attempted to pull the counts out on the footer format event and place the values in report footer controls, but that hasn't worked either.

  4. #4
    Join Date
    Nov 2011
    Posts
    413
    Here is an example of a textbox on one of my reports that does the sum of my deposits.
    =Sum([expnetpay]) Maybe this can be modified to work for you. Also you may want to consider something like this.
    ="For the time period of " & DteStart() & " thru " & DteEnd()

    This is on another textbox,it shows you that you can have multiple criteria in the same expression.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    what I'd do is
    consider stuffing the counts on the last page, but renumber it to be page 1
    OR
    run a series of select statements, or a single statement grouped by whatever and write those to the page header on page 1
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Oct 2011
    Posts
    71
    Thanks for both of your replies on this matter.

    Burrina: as for your thought, we think a like. The counts work underneath each group header and I can get a total count on the report header. Then I can transfer that to the report header. However, the individual group counts I am unable to capture.

    healdem: could you be more specific on what you mean by select statements? Following this I have some code which I thought would select the individual group counts out, but it does not. Is there something I'm missing?

    Best chance I thought I had was placing this code in the On Format Event inside the group header.

    If me.box_Status = "Completed" Then
    me.box_StatusCompleted = me.box_Count
    End If
    If me.box_Status = "Open" Then
    me.box_StatusOpen = me.box_Count
    End If


    Me.box_Status is control for the group. Me.box_Count is the control for the count of records in a group and Me.box_StatusCompleted is the control the the report footer to try and capture the informaiton. The code fires exactly as I thought it should other than, it does not grab that groups count number.

    The code is activated only once and it is able to update the control, Format Event is not the event that spits out the individual group total.
    Last edited by ericx1; 11-29-11 at 17:23. Reason: To make it more presentable

  7. #7
    Join Date
    Nov 2011
    Posts
    413

    Group Totals

    Are you able to get these totals elsewhere like your form.query?
    If so just create an unbound filed on your report and use that as your criteria.

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    SQL underpins Access, its the way Access retrieves and manipulates data. if you are makinguse of all of the wizards you probably are not seeing the SQL.
    what Id do would be to create a recordset
    apply whatever SQL I needed to marshall the data
    then stuff that data into the report

    another technique if you are afraid of getting your toe in the water with SQL is to create a parent / child report
    the parent report merely prints the totals, then in the parent reports 'report footer' stuff the child report which gives the details
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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