Adding Maximum values

Discussion in 'Microsoft Access Reports' started by Guest, Mar 3, 2007.

  1. Guest

    Guest Guest

    I'm sure this has an easy answer, but I have not been able to figure it out.

    I've create a report that calculates the maximum enrollment for each
    preschool. I did it using the following fields in the given sections:

    Detail section: [Enrollment]
    Provider Footer: =Max([Enrollment]

    I need a sum of all the Max([Enrollment]) for a grand total at the bottom,
    but I can't figure out the proper expression. Everything I try yields an
    error message. Thank you for your help!
     
    Guest, Mar 3, 2007
    #1
    1. Advertisements

  2. Guest

    Allen Browne Guest

    In the Provider footer section, place another text box, and set these
    properties:
    Control Source =[Text1]
    Running Sum Over All
    Visible No
    Format General Number
    Name txtMaxOfEnrollmentRS
    replacing Text1 with name of the text box you already have.

    In the Report Footer section, place a text box with Control Source of:
    =[txtMaxOfEnrollmentRS]

    The invisible text box collects the running sum across the whole report, and
    the final text box in the report footer displays it.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "NB" <> wrote in message
    news:...
    > I'm sure this has an easy answer, but I have not been able to figure it
    > out.
    >
    > I've create a report that calculates the maximum enrollment for each
    > preschool. I did it using the following fields in the given sections:
    >
    > Detail section: [Enrollment]
    > Provider Footer: =Max([Enrollment]
    >
    > I need a sum of all the Max([Enrollment]) for a grand total at the bottom,
    > but I can't figure out the proper expression. Everything I try yields an
    > error message. Thank you for your help!
     
    Allen Browne, Mar 3, 2007
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Allen,
    Sorry it took me a while to get back to you. In the meantime, I had to add
    another group (region) to the report.

    I was able to get the running sum going, and get a subtotal in the Provider
    footer, and region footer, but the grand total still wasn't adding up.

    But because your instructions were so clear and easy to follow, I took your
    concept and duplicated your advice by adding an additional invisible field in
    the Region footer, naming it, and having the grand total call on that name.
    Now it works like a charm.

    Thank you so much for your help. You are the best!


    "Allen Browne" wrote:

    > In the Provider footer section, place another text box, and set these
    > properties:
    > Control Source =[Text1]
    > Running Sum Over All
    > Visible No
    > Format General Number
    > Name txtMaxOfEnrollmentRS
    > replacing Text1 with name of the text box you already have.
    >
    > In the Report Footer section, place a text box with Control Source of:
    > =[txtMaxOfEnrollmentRS]
    >
    > The invisible text box collects the running sum across the whole report, and
    > the final text box in the report footer displays it.
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "NB" <> wrote in message
    > news:...
    > > I'm sure this has an easy answer, but I have not been able to figure it
    > > out.
    > >
    > > I've create a report that calculates the maximum enrollment for each
    > > preschool. I did it using the following fields in the given sections:
    > >
    > > Detail section: [Enrollment]
    > > Provider Footer: =Max([Enrollment]
    > >
    > > I need a sum of all the Max([Enrollment]) for a grand total at the bottom,
    > > but I can't figure out the proper expression. Everything I try yields an
    > > error message. Thank you for your help!

    >
    >
     
    Guest, Mar 8, 2007
    #3
  4. Guest

    Allen Browne Guest

    Well done!

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "NB" <> wrote in message
    news:...
    > Allen,
    > Sorry it took me a while to get back to you. In the meantime, I had to
    > add
    > another group (region) to the report.
    >
    > I was able to get the running sum going, and get a subtotal in the
    > Provider
    > footer, and region footer, but the grand total still wasn't adding up.
    >
    > But because your instructions were so clear and easy to follow, I took
    > your
    > concept and duplicated your advice by adding an additional invisible field
    > in
    > the Region footer, naming it, and having the grand total call on that
    > name.
    > Now it works like a charm.
    >
    > Thank you so much for your help. You are the best!
    >
    >
    > "Allen Browne" wrote:
    >
    >> In the Provider footer section, place another text box, and set these
    >> properties:
    >> Control Source =[Text1]
    >> Running Sum Over All
    >> Visible No
    >> Format General Number
    >> Name txtMaxOfEnrollmentRS
    >> replacing Text1 with name of the text box you already have.
    >>
    >> In the Report Footer section, place a text box with Control Source of:
    >> =[txtMaxOfEnrollmentRS]
    >>
    >> The invisible text box collects the running sum across the whole report,
    >> and
    >> the final text box in the report footer displays it.
    >>
    >> "NB" <> wrote in message
    >> news:...
    >> > I'm sure this has an easy answer, but I have not been able to figure it
    >> > out.
    >> >
    >> > I've create a report that calculates the maximum enrollment for each
    >> > preschool. I did it using the following fields in the given sections:
    >> >
    >> > Detail section: [Enrollment]
    >> > Provider Footer: =Max([Enrollment]
    >> >
    >> > I need a sum of all the Max([Enrollment]) for a grand total at the
    >> > bottom,
    >> > but I can't figure out the proper expression. Everything I try yields
    >> > an
    >> > error message. Thank you for your help!
     
    Allen Browne, Mar 8, 2007
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miranda

    adding subreport values on main report

    Miranda, Feb 17, 2004, in forum: Microsoft Access Reports
    Replies:
    1
    Views:
    136
    Marshall Barton
    Feb 17, 2004
  2. Fons Ponsioen

    Option Group values converted to Text String values in reports

    Fons Ponsioen, May 17, 2004, in forum: Microsoft Access Reports
    Replies:
    3
    Views:
    429
    Duane Hookom
    May 18, 2004
  3. Guest

    Exclude null values in average of a column of values?

    Guest, Jan 6, 2006, in forum: Microsoft Access Reports
    Replies:
    5
    Views:
    1,284
    John Spencer
    Jan 6, 2006
  4. Replies:
    1
    Views:
    234
    Allen Browne
    Jun 30, 2008
  5. Rob

    match 2 values in a field to values listed in a table

    Rob, Jan 21, 2009, in forum: Microsoft Access Reports
    Replies:
    4
    Views:
    225
    John Spencer (MVP)
    Jan 27, 2009
Loading...

Share This Page