Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ControlSource for Option Group
Message
From
09/06/2006 17:04:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01128221
Message ID:
01128227
Views:
18
>>>I have an option group that had 9 options. They were arranged on the form from option1 to option9 and listed in the property sheet from option1 to option9. Now I need to add a new option and it must be on the form between option3 and option4. How does the ControlSource play into this? If the controlsource is set to 4, it is selecting the 4th option listed on the form, or the 4th option listed in the property sheet. My controlsource is not working as expected and I am confused.
>>>
>>>Brenda
>>
>>I don't know of any way of changing the option order, but I don't think you need to. Simply change the captions on buttons 4-10. You will probably need to update your data to reflect the changed 4th option.
>
>
>optiongrp1.controlsource = 4
>
>what does that mean? is it the 4th one listed on the property sheet that will be selected?

Sorry for the one word answer, I hit send too early. :)

Yes. However setting the controlsource itself to 4 doesn't mean anything. The controlsource is a field which is used to tie the data to the control.

For example :
optiongrp1.controlsource = "mytable.optionfield"

If mytable.optionfield = 4 then :

optiongrp1.option4.value = 1

all other options will have value = 0

Hope this helps
Wine is sunlight, held together by water - Galileo Galilei
Un jour sans vin est comme un jour sans soleil - Louis Pasteur
Water separates the people of the world; wine unites them - anonymous
Wine is the most civilized thing in the world - Ernest Hemingway
Wine makes daily living easier, less hurried, with fewer tensions and more tolerance - Benjamin Franklin
Previous
Reply
Map
View

Click here to load this message in the networking platform