• This seems to be exactly what i needed. I integrated your code bit by bit, to see what was happening each step of the way. I found that the isnull call in havingby made a striking difference; it wouldn't display anything otherwise.

    Thanks for your help wayne!