Re: How to compare fields
- From: John Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Sep 2005 11:49:37 -0600
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]
.
- References:
- How to compare fields
- From: Luther
- How to compare fields
- Prev by Date: Selecting records with email addresses
- Next by Date: Re: Working with Dates in Access
- Previous by thread: RE: How to compare fields
- Next by thread: Re: How to compare fields
- Index(es):
Relevant Pages
|