I don't believe you can set a non MDI Container to be an MDI Parent, but you didn't mention what error you are getting. Also the way you have that code the IF is not needed as it will always be true. You set the object to nothing and then on the next line test if it is nothing or not, but since you just set it to be nothing it will always be true.