Ok.
so, you discovered already that using isdeclared works.
anyways, like said previously, we are talking about kixtart variables, so it has nothing to do with kixforms or forms.
if you want to scope the variables into that function, you need to use DIM.
and, just to make it more confusing, kixforms classic has it's own variables, I think they were called expandos.
anyways, once you dim your $subform1, it will get disposed on exit from that function.
also, $system should have it's own doevents. again, not 100% sure cause it's like 5 years since I last used classic. but if it, it should streamline the code quite a bit.
_________________________
!download
KiXnet