Hi Brian and thank you so much for replying. I tried what you suggested but it didn't work but you mentioned that I had an extra comma and I removed this and it worked so huge credit to you for helping me. I was following the format that I got from the web but I didn't realise that the extra comma would cause it to fail.
I have now tested to run groups and groupings and it is working as expected.
Many thanks again Brian. I appreciate you taking the time to lend me a hand. All the best!