Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public Variable in multiple instances of a form
Message
 
 
À
07/11/2001 15:44:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00578723
Message ID:
00578730
Vues:
21
>I have a situation where multiple instances of a form are activated.
>A public variable is used to hold the current filter value on a free table.
>When one of the instances of the form is closed it releases the public variable.
>Another instance of the form then encounters an error where the public variable
> is not found.
>I am not up as well as I should be on my macro substitution.
>Would someone out there please show me the proper way to handle this case.
>

Add new property to your form and keep filter variable in this property instead of global variable. Don't use variable or property in the filter expression. Use it's value as shown below.
lcFilterExpr = [somefield = "] + ThisForm.cFilter + ["]
SET FILTER TO &lcFilterExpr
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform