Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP version of a @...say field
Message
From
18/09/1996 16:11:56
 
 
To
18/09/1996 15:56:34
Gregg Plummer
Transportation Improvement Board
Olympia, Washington, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00008136
Message ID:
00008137
Views:
46
>This may have an obvious answer, but here goes anyway ...
>
>Suppose you have a region field in a table that is numeric, with values ranging from 1 to X. In a form you want to display a text string depending on the value of this field.
>i.e. value of 1 = "Eastern Region", 2 = "Western Region", 3="Central Region", etc. (Similar to what you can do in FP 2.x with a @...say field and an IIF() statement.)
>
>Can this be done with a text box? if so, how? if not, then what is the easiest alternative?

>> The easiest way to DISPLAY is a Label Control with Init Code: This.Caption=IIF(...), the same can be used for Textbox (especially with Format="M". But the consistent solution is a lookup table containig ID and Names (like 'Eastern Region',etc.) and Combobox control.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform