sorry for the post. I finally got it working. I had a scope problem not represented in the sample that i posted. I suppose the code above should be working.