Information générale
Catégorie:
Gestionnaire d'écran & Écrans
You could create a property in the primary form, say NbRef, and initialize it at zero. When each form using the primary's form datasession is created, increment the property by one. When they are released, decrement it.
In the QueryUnload() of the primary form, if NbRef > 0, issue a NODEFAULT.
BTW, why are you using the same datasession?
>The user usually has a primary pageframe displayed because it contains client information, telephone log, shipping,etc. This form is set to private datasession.
>
>The user can select other forms: Work In Progress, invoices, payments, etc. If the primary form is open, the other form opens using primary's datasession...if not, it uses default.
>
>The problem is, the user accidently closing the primary form when its datasession is being used by a second form.
>
>How can I prevent this from happening?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement