Find Max Values and Return Null Value Too

G

Guest

I'm trying to create a query that will find the maximum value for a field and if that field is null it will still display the record but the max will be blank. In Access, using the "Totals" and selecting the totals type as "Max", works except it does not display null values. I've tried using dmax too with no luck

How can I find the max value for a field and include records where the same field is null?

Any help would greatly be appreciated!!!
 
G

Gerald Stanley

Try something along the lines of
SELECT etc
FROM YourTable
WHERE yourColumn IN (SELECT Max(yourColumn) FROM YourTable)
OR yourCoulmn Is Null;

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I'm trying to create a query that will find the maximum
value for a field and if that field is null it will still
display the record but the max will be blank. In Access,
using the "Totals" and selecting the totals type as "Max",
works except it does not display null values. I've tried
using dmax too with no luck.
How can I find the max value for a field and include
records where the same field is null??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top