Hi Christine
it looks like your window should return and value and sometimes is closed without doing so...
La fonction ????? would be 'the procedure ???,' in that case your window, which may also be missing it's first line procedure MywindowName()
But without seeing your window, that's just a guess
Best regards