Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Highest value on report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
s4 - 19 Jan 2008 11:55 GMT
Hi, I have a report with textboxes that dlookup, davg, dmax and dmin values
from a couple of tables. I have about 5 dmax ones from different fields, so
it's like a high score style thing, though they aren't ordered in ascending
order, so is there a way to make a label saying 'HIGHEST' next to the textbox
with the highest amount. Basically I need to determine which text box on the
report has the greatest value so that it can be highlighted. Any way to do
this?

Thanks
Al Campagna - 19 Jan 2008 14:55 GMT
Use the OnFormat event of the section that contains the 5 calculations. (ex.
fields T1, T2, T3, T4, T5)
This woukd be a "brute force" method...
If T1 > T2 And T1 > T3 And T1>T4 And T1 > T5 Then
   ' highlight the T1 control
ElseIf T2 > T1 And T2 > T3 .... T2 > T5 Then
   ' highlight the T2 control
ElseIf.... etc for all possibilities
.
.
End If

Signature

   hth
   Al Campagna
   Microsoft Access MVP
   http://home.comcast.net/~cccsolutions/index.html

   "Find a job that you love... and you'll never work a day in your life."

> Hi, I have a report with textboxes that dlookup, davg, dmax and dmin
> values
[quoted text clipped - 10 lines]
>
> Thanks
Allen Browne - 19 Jan 2008 15:34 GMT
See the MaxOfList() function here:
   http://allenbrowne.com/func-09.html

Signature

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.

> Hi, I have a report with textboxes that dlookup, davg, dmax and dmin
> values
[quoted text clipped - 10 lines]
>
> Thanks
Al Campagna - 20 Jan 2008 14:11 GMT
Excellent!  A "keeper."
Signature

   hth
   Al Campagna
   Microsoft Access MVP
   http://home.comcast.net/~cccsolutions/index.html

   "Find a job that you love... and you'll never work a day in your life."

> See the MaxOfList() function here:
>    http://allenbrowne.com/func-09.html
[quoted text clipped - 14 lines]
>>
>> Thanks
s4 - 20 Jan 2008 09:56 GMT
Thanks guys.

> Hi, I have a report with textboxes that dlookup, davg, dmax and dmin values
> from a couple of tables. I have about 5 dmax ones from different fields, so
[quoted text clipped - 5 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.