Gary wrote
...Here is the problem, If someone posts spam into a thread that has already been posted and I ban them and delete their post I lose the whole thread, even if they were the last poster in the thread.
I think you are probably mistaken. When you remove a spam, you go to the spam post, and click More->Remove post & replies from thread - this will only remove the spam post, and if it has replies, the replies. But a spam shouldn't get replies.
To see who replies to whom, click the "Threaded" link, and that will give you a view of the reply-to relationship.
Gary wrote
If I just ban the author it is supposed to ban them and all their posts. I've tried this and the posts still remain.
Go to your forum, click Options->Remove User - this will allow you to remove all posts by a user and with an option to ban that user. Does this achieve your goal here?
Gary wrote
Also is there any way I can retrieve the threads that have been accidentally removed from the forum due to me deleting the spammers posts?
If you can find those posts, you can email the author of the post and ask the author to use "More->Move Post to..." to move their posts back to your forum.
I hope I have answered your questions.