I have 8 columns in access with different numbers. In the 9th column, how can
I write a formula in update query to populate the minimum number in the
previous 8 columns (in the same row) and have it ignor the 0 or blanks?
Thanks a lot!!
Your table should NOT contain such a field.
Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.
For that matter, having eight fields across and needing to treat them
all in parallel suggests that you have a one to many (one to eight to
be precise) relationship incorrectly embedded in a single record.
You'll need some VBA code to parse the eight fields and find the least
of them. But I'd STRONGLY suggest either doing this in Excel, as it's
really a spreadsheet structure, or properly normalizing your table!
John W. Vinson[MVP]