You do realize that in general MAX(rev) and MAX(date) in your query may not come from the same record?
>Thanks for the replies. It turns out I overlooked a portion of earlier code where I converted the date to a character string therefore the MAX() was not working the way I intended. I have fixed the problem and MAX() is now doing what I had hoped. Sorry to waste your time on a stupid mistake.
--sb--