That gave the same result.
Here is what I am finding out. If I place the code in another procedure like "activate" I don't get the error, but it does me no good there. It has something to do with the "open" procedure. And it's the only procedure that will do what I need.