Thank you for your code, though it does not seem to 'capture' the CstrCode nor does it seem to resave the query.
If I run through the steps and manualy put in the code, the save works. I think the trick is to make that line of code work some how.
Any other pointers?