Thanks for that, it worked, but has created another problem now.
When I look at the query and run it, it works fine. But when i put that field into the report it comes up with another error message now:
"Multi-level GROUP BY clause is not allowed in a subquery."
The final code for the...