Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting control source to a variable
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00677331
Message ID:
00719706
Views:
29
>Ed,
>
>Thanks for the response. Could you tell me exactly how to go about changing the current control based upon the value of a different column?
>
>Thanks again.


Sure - use the DynamicCurrentControl property. Let's say you have the default Text1 TextBox and a second TextBox named Text2 in the same column, which has a different control source. You have a field named Foo in the recordsource for the Grid. If Foo is "Blue", use the Text1 TextBox, otherwise use Text2. Set the following properties in the Column:

.Sparse = .t.
.DynamicCurrentControl = [IIF(Foo="Blue","Text1","Text2")]

Not much more to it...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform