Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble changing the data type of an Option Group contro
Message
 
To
23/01/2009 12:36:12
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01376569
Message ID:
01376576
Views:
12
>The data is being parsed in and out of the application, so changing the data type would mean reprogramming three systems. If I can make the interface connect to the data as is then that would be preferrable.

Not sure if this will work:
Do not set ControlSource to that OptionGroup.
Add a method in the form named SetOptValue()
In it:
IF thisform.OptionGroup.Value # VAL(Table.Field)
   thisform.OptionGroup.Value = VAL(Table.Field)
   WITH EVALUATE([thisform.OptionGroup.Option]+ALLTRIM(STR(VAL(Table.Field),2))
        .SetFocus() && Just to change focus to the right Option Button
   ENDWITH
ENDIF
Then you should call that method in Init Event of the form and Everywhere you change the record pointer of that table.

If InterActiveChange event of the OptionGroup put:
REPLACE Field WITH STR(this.Value,2) IN Table
That is on top of my head and you should polish it to work for you in any occasions.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform