Hi Gregory
Hmmm
I appreciate your reservation. When the user selects a form to open, this routine is used to see if that form is already open, so as not to invoke it twice. How, in the time between the user selecting a form to open (e.g. from a menu or from an icon), and its opening, could he have selected another form and closed it?
But, indeed, I have seen similar code used for closing down all the forms in an app. In that case, as you say, the .FormCount will decrement with each one closed (Just luike .ListCount decrements in a mover list).
Maybe I'm missing a scenario/eventuality/permutation of events here but I can't see it.
Terry
>hi Terry,
>
>The remarks also apply to the use you have for it.
>_______________________________
>>Thank you, Gregory
>>
>>This routine is used for something else, to see if a named form is open, and was not meant for Peter's problem. I just thought it might be useful to him to adapt it. But, yes, if used for closing forms down then you'd be right.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.