I'm trying to display the maximum value of multiple fields, over a number
of
records.
This is the best visual representation of the kind of situation I'm up
against.
Column1-------Column2-------Column3-------Column4
======================================
0001---------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
0002------------0003--------------------------------------------------
0004---------------------------------------------------------------------
----------------------------------------------------------------------------
0005------------0006-------------0007------------------------------
Each of the values above are examples of numbers entered into four
different
textboxes by the users through a form. Each textbox is assigned to each
Column.
I would like to have an additional textbox within the form that displays
the
next available number of the last record where the number was actually
used.
Therefore, the function must keep track of the maximum value across all
four
Columns. Also, some rows do not contain anything (because the specific
record
did not require the use of the number), but the textbox will still keep
track
of the next available number. In the example above the textbox would
display
"0008". The user may or may not need to use this number for the particular
entry, but never the less "0008" is waiting to be used.
DMax will give the the maximum value for a single field over a number of
rows (where the number of rows can be influenced through a Where clause).
You haven't given any indication whether or not the 4 fields are in a
single
row, or are the same field in 4 separate rows. If they're 4 fields in a
single row, then DMax won't do anything for you.
It may well be ideal for you to use Access, but it will be even better for
you if you use it properly!
It is ideal for me to use Access for many reasons.
[quoted text clipped - 27 lines]
textbox should display the highest of the four fields of the last
record.