how do i find the minimum between multiple variables by record

K

klo

How do I find the minimum between multiple variables by record in Access? For
example, i need to find the lesser of columns (variables) A, B and C for each
record in my database.

Also, do the fact that A, B and C are dates change anything?

Thank you!
 
J

John Vinson

How do I find the minimum between multiple variables by record in Access? For
example, i need to find the lesser of columns (variables) A, B and C for each
record in my database.

Also, do the fact that A, B and C are dates change anything?

Thank you!

The need to do this suggests (but does not establish) that your table
may not be correctly normalized. If there were one *record* per date,
a simple totals query with a Min() would find it.

As it is, you need either some VBA code or a rather snarky nested IIF:

IIF([[A] < , IIF([A] < [C], [A], IIF( < [C], , [C])), IIF(
< [C], , IIF( < [C], , [C]))

Air code, you'll need to test it.

John W. Vinson[MVP]
 
Top