Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble changing the data type of an Option Group contro
Message
 
À
23/01/2009 12:36:12
John Murray
Health Research, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01376569
Message ID:
01376576
Vues:
15
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform