DMax Function in Access
DMin Aggregate Function
Microsoft Access Min Max Domain Aggregate Functions
Finding the minimum and maximum values for a record set
is best done using the min and max function of a 'totaled' query. However, for completeness we include the examples of these functions here.
Note that the average aggregate function (Davg) has the same
format & syntax as the Dmin function and Dmax function examples below.
In our Employees table, query or view setup we have a list of employees and each of their current salaries along with their
Microsoft Access is a fully capable database and it's primary limitations is the number of concurrent users it will support. Generally, we recommend a limit of 10 to 15 users.
We create databases large and small. Some of our databases help run entire small businesses. We also handle unique businesses such as flyrod manufacturing, cheese making, marina management, and cable tv inventory.
An unbound form or report field would have the following
Record Source to calculate the minimum value in the recordset:
To restrict the minimum to a specific department we add
the restriction clause:
If records are grouped by department on the form or
report you can use the recordset field name to restrict the scope of the
DMin and DMax functions:
=DMin("Salary","Employees","Department='" & Department &
Note that the field name department is bounded by single
quote marks ( ' ) and those quote marks have double quote marks delineating
them which makes figuring out the above example a little difficult.
Here's the same command that may be a little easier to read:
=DMin("Salary","Employees","Department=" & Chr(34) &
Department & Chr(34))
Rapping a chr(34) around the department recordset field
simply enclosed it in double quote marks.
The DMax functions are the same... just substitute DMin with