http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/6248004900cda4fb862570910046ff11?OpenDocument&Highlight=0,global,variable,scope
Also,is there any chance somewhere along the line you're re-setting or declaring something that's a global variable?
Update: I just created a variable on a test form and set it on queryOpen. I tested using a messagebox for several form events including queryClose and the var was available as it was set in the QO event.