The last line does clear the old querydef. The issue you are experiencing lies with the FilterOn Property being either true or false.
When you remove or reset the filter, access only sets the FilterOn property to false, so when adding in the filter you need to check whether it is currently on or...