It does not look as if the code you posted is complete. Please re-post code with proper formatting and indentation, and be sure to
UseCodeTags.
You might also want to explain what exactly is going on, including how you think things should be working and what's actually happening.