How to compare fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
I would like to know the answer to that question also, if you get no better
answer you can use the long way

IIF(IIf(Field1>Field2,Field1,Field2)<Field3,Field3,IIf(Field1>Field2,Field2,Field1)))
 
I would like to know the answer to this question also, if you'll get no
better answer, try this

IIF(IIF(Field1>Field2,Field1,Field2)<Field3,Field3,IIF(Field1>Field2,Field1,Field2)))
 
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] > , IIF([A] > [C], [A], IIF( > [C], , [C]), IIF( >
[C], , IIF( > [C], , [C]))

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

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top