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