[AccessD] Max of 20 values

Darren - Active Billing darren at activebilling.com.au
Sun Jul 24 18:47:09 CDT 2011


Hi Arthur
Coming in late to this so you may have already have implemented a solution.
(And to be honest haven't read all the threads so I may have missed
something in the posts) :-)
Couple of assumptions:
1  Assuming your '20' recorded time measurements all sit in one table
2  Assuming they all have a relevant PK/Surrogate key to group each test
batch of 20...eg TestBatchNo etc.
Can't you just use a Domain lookup? DMAX?

E.g. Have some display field bound to the following after the update of each
table
DMax("TimeTakenToForceShutOffField","InSomeTable","SomePK/SurrogateKeyForThi
sTestBatchof20  = " & intSomeTestBatchIdenfifier & ")"

Many thanks

Darren

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Saturday, 23 July 2011 10:54 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Max of 20 values

I have a form into which the user enters up to 20 values (measurements in
time). They all default to zero. I'm trying to think of an elegant way to
find the max value among the 20. Create an array and bubble sort it? I want
to call this code on the AfterUpdate of each of these 20 controls so the
control called MaxReading gets a new value if any of the 20 controls goes
higher than the current MaxReading value.

TIA,
Arthur
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list