Phil
While this expression may work (may, because Nulls could mess with it)
when there are exactly three tries (as the OP stated), there will need to
be a major maintenance effort made if the number of tries ever changes.
The table will change, any queries referring to those fields will change,
any forms using those fields will change, any code/macros ... (you get
the picture).
In the long run, the OP will either pay now (normalizing the data) or pay
later (increased maintenance). Or, there's always Excel?!
Regards
Jeff Boyce
Microsoft Office/Access MVP
You have try1, try2, and try3. Those are the fields with each score.
Use an Iif to give you the greater of try1 and try2, then use an iif to
give you the greater of that, or try3.
Iif (
iif([try1]>[try2],[try1],[try2])>[try3],
iif([try1]>[try2],[try1],[try2]),
[try3])
Phil
Tom Tripicchio wrote:
Thanks for the response Jeff,
I did it that way because the 3 trials are all tied to the same date. An
example would be that we ask a patient to perform a task 3 times and use
the highest score. But I need to capture the score of all 3 tests. Then
I would graph the improvement over time of the maximum scores.
If there is another way I am open.
Tom
Tom
That depends...
Are the three scores held in three separate fields in the underlying
table? If so, this describes ... a spreadsheet! Looking "across"
fields for a maximum is something that you'd do in Excel, but Access is
a relational database, and provides relationally-oriented features and
functions.
In a well-normalized Access table, finding the maximum of a set of
scores involves looking "down" (across multiple records), not "across"
(within the same record).
Regards
Jeff Boyce
Microsoft Office/Access MVP
I have a form that has 3 trial scores, I would like a field in the
same form to show me the maximum score of the 3 trials.
How can this be done?
Thanks, Tom