>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)