This may occur to you in the future. You want to get the min or max of
a field that you set criteria on...maybe for a combo box. Let's say you
wanted to get the minimum of all date fields where the date field is in
the future. If you use the query builder and don't modify the results
you end up with zero records. Ex.
SELECT Min(DateField) AS MinDate
FROM Table
HAVING Min(DateField) > Date()+1
The above is code generated, minus all the ()'s, from the query builder.
If you really have the min or max records beyond today, you need to
manually modify the query to change the word Having to Where
SELECT Min(DateField) AS MinDate
FROM Table
Where DateField > Date() + 1
a field that you set criteria on...maybe for a combo box. Let's say you
wanted to get the minimum of all date fields where the date field is in
the future. If you use the query builder and don't modify the results
you end up with zero records. Ex.
SELECT Min(DateField) AS MinDate
FROM Table
HAVING Min(DateField) > Date()+1
The above is code generated, minus all the ()'s, from the query builder.
If you really have the min or max records beyond today, you need to
manually modify the query to change the word Having to Where
SELECT Min(DateField) AS MinDate
FROM Table
Where DateField > Date() + 1
Comment