Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dropdown Box LostFocus
Message
De
23/08/2005 22:16:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01043133
Message ID:
01043142
Vues:
9
>I tried that and got an error, "Operator/Operand type mismatch".

What data type is quotes.cust_no? What is stored in lcValue?

As I understand macro substitution, lcValue is first replaced with whatever value it contains, and then the expanded statement is executed.

This means that if you may have to provide quotation marks, if cost_no is of type "C", for example:
local lcValue
lcValue = ["] + alltrim(This.DisplayValue) + ["]
SET FILTER TO QUOTES.CUST_NO = &lcValue
ThisForm.Refresh()
or, you can also macro-substitute the entire SET FILTER command:
local lcFilterCommand
lcFilterCommand = [set filter to quotes.cust_no = "];
  + allt(This.DisplayValue) + ["]
&lcFilterCommand
ThisForm.Refresh()
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform