Thanks, David.
I managed to solve this before I saw your post, by simply recreating the whole query.
But, for future reference, can you tell me why changing the code as you suggest would have fixed the original query, and how you know to write it this way?
Thanks,
Gary