Re: How to compare fields



On Mon, 12 Sep 2005 08:31:04 -0700, Luther
<Luther@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>Hi,
>
>I need to compare three numeric fields and pick the greater of the three; I
>will then have to use that number in subsequent calculations.
>
>Any help with this will be greatly appreciated.
>
>Thanks.

You may want to look at your table normalization: the need to do this
suggests that you have a one-to-many (one to three in this case)
relationship embedded within each record.

That said... a nasty nested IIF will work:

IIF([A] > [B], IIF([A] > [C], [A], IIF([B] > [C], [B], [C]), IIF([B] >
[C], [B], IIF([B] > [C], [B], [C]))

You'll need to check the logic and parentheses, that's just off the
top of my head...

John W. Vinson[MVP]
.



Relevant Pages

  • RE: How to compare fields
    ... > I need to compare three numeric fields and pick the greater of the three; ... > will then have to use that number in subsequent calculations. ... Prev by Date: ...
    (microsoft.public.access.queries)
  • How to compare fields
    ... I need to compare three numeric fields and pick the greater of the three; ... will then have to use that number in subsequent calculations. ... Prev by Date: ...
    (microsoft.public.access.queries)
  • RE: How to compare fields
    ... "Ofer" wrote: ... >> I need to compare three numeric fields and pick the greater of the three; ... >> will then have to use that number in subsequent calculations. ... Prev by Date: ...
    (microsoft.public.access.queries)
  • RE: How to compare fields
    ... Good luck ... > I need to compare three numeric fields and pick the greater of the three; ... > will then have to use that number in subsequent calculations. ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: how to compare date
    ... Date/time fields in Access are really numeric fields of type Double, ... by default formatted as some date format for display, ... if you want to compare ...
    (microsoft.public.access.queries)