Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formula for converting multi choice into a number
Message
 
À
29/11/2012 10:02:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01558333
Message ID:
01558351
Vues:
68
>>>Thank you very much! Now I just need to copy your code and paste it into mine <g>.
>>>
>>>>Based on Tore' suggestion:
>>>>
>>>>
>>>>*** To calculate value and let you have 6 CheckBoxes in the forms:
>>>>lnValue = 0
>>>>FOR lnFor = 1 TO 6
>>>>    WITH EVALUATE("thisform.Check"+TRANSFORM(lnFor))
>>>>         lnValue = IIF(.Value, BITSET(lnValue, m.lnFor-1))
>>>>    ENDWITH
>>>>NEXT
>>>>? lnValue
>>>>
>>>>*** To Get it back:
>>>>lnValue = FieldWhereYouSave
>>>>FOR lnFor = 1 TO 6
>>>>    WITH EVALUATE("thisform.Check"+TRANSFORM(lnFor))
>>>>         .Value = BITTEST(lnValue, m.lnFor-1)
>>>>    ENDWITH
>>>>NEXT
>>>>
>>
>>And test it :-)
>
>Test it? Are you chicken?

Testing is for sissies.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform