Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dropdown Box LostFocus
Message
From
23/08/2005 21:45:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01043133
Message ID:
01043135
Views:
15
>I used the following code to SET FILTER thinking I could select the item in the dropdown box; I haven't done this in a while so I am forgetting how I did it before. Any ideas?
>
>*LostFocus Method:
>SET FILTER TO QUOTES.CUST_NO=This.DisplayValue <---Doesn't work.
>ThisForm.Refresh()

The problem is that the filter expression, including "This.DisplayValue", remains in effect later, when "This" no longer refers to the same object. A macro substitution should work.
local lcValue
lcValue = This.DisplayValue
SET FILTER TO QUOTES.CUST_NO = &lcValue
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform