How make largest calculated value in detail section of report print in footer section

I have a report that has a calculated number value in each record on the report.  In the footer section of the report I want to print the largest of the detail values.  Just the one largest value.  How can I do this?

--Steve
SteveL13Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Assuming the calculation in the the query driving the report, create a text box in the Footer

Control Source:

=DMax([YourCalcFieldName])

mx
0
Rey Obrero (Capricorn1)Commented:
you can try dmax with a domain

=dmax("[calculatedfield]","queryName")

"queryName" is the name of the Record Source of the report
0
SteveL13Author Commented:
The first suggestion does not work.  The second one only gives me the last calculated value from the detail section.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
And actually, make the Control Source of the text box


=Max([YourCalcFieldName])

not DMax()

And using the method will take into account any filtering that may occur when the report open.  Getting DMax() from the query will not.

mx
0
Rey Obrero (Capricorn1)Commented:
how do you do the calculation ?
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
SteveL13:  try my post @ http:#a36965549

mx
0
Dale FyeCommented:
is this a continuous form, or a single form?
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
It's a report ...
0
Nick67Commented:
Me being me, I'd code it

Public TheBiggest as Single 'or double or integer or whatever

Then in the ReportOpen()
TheBiggest=0

Then in the Detail_Format()
if WhateverYouAreCalculating > TheBiggest then
     TheBiggest = WhateverYouAreCalculating
end if  


And finally in whatever section you want to display it
Me.SomeControlValue = TheBiggest

You might be able to muck with some control value to get it to work--and that might be more elegant.
This will work, and you can understand how it works--which is why I'd do it this way
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SteveL13Author Commented:
This worked perfectly.  Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.