Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'set filter to' in valid event?
Message
 
 
À
28/02/2000 07:21:56
Lawrence De Grano
Computer Craft Corporation
Makati, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00338266
Message ID:
00338333
Vues:
10
select mytable
lcvalue = This.Value
Set Filter to field = lcvalue

When you issue the above commands the filter expression looks like the following:
field = lcvalue

Whenever you access the table after that, FoxPro will evaluate lcvalue at that time and give you the records you want. However, if lcvalue was a local or private variable, it will most likely not be in scope when you attempt to evaluate it again so FoxPro throw an error (Variable lcvalue not found). It must evaluate the variable immediately.

One other thing. The above works well with date and numeric data types. I forgot, in my previous post, to surround the macro substitution in quotes if the filter condition is a character string.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform