Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stepping through field names myfield1, myfield2, myfield
Message
De
01/03/2000 12:01:33
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00339788
Message ID:
00339888
Vues:
13
Ok

I see how that works - that should work for the field names in the table ... but what about the corresponding
button names on the form?

Here is my code snippet the LONG way...

MENU is the table name (I know, MENU is a reserved word ;-) )
DESCx is the caption stored in the MENU table
BUTNx is the button on the form


if !isblank(menu.type1)
thisform.butn1.enabled=.T.
thisform.butn1.caption="\<1"+chr(13)+trim(menu.desc1)
else
thisform.butn1.enabled=.F.
thisform.butn1.caption="\<1"
endif

if !isblank(menu.type2)
thisform.butn2.enabled=.T.
thisform.butn2.caption="\<2"+chr(13)+trim(menu.desc2)
else
thisform.butn2.enabled=.F.
thisform.butn2.caption="\<2"
endif

if !isblank(menu.type3)
thisform.butn3.enabled=.T.
thisform.butn3.caption="\<3"+chr(13)+trim(menu.desc3)
else
thisform.butn3.enabled=.F.
thisform.butn3.caption="\<3"
endif

if !isblank(menu.type4)
thisform.butn4.enabled=.T.
thisform.butn4.caption="\<4"+chr(13)+trim(menu.desc4)
else
thisform.butn4.enabled=.F.
thisform.butn4.caption="\<4"
endif



Pete

>>I see what the field command does but how do I know what field I am in... I need to use the CAP fields only
>>and not the others. Is there anyway to just get those?
>>
>
>You could use AFIELDS() then ASCAN() to locate them. Make sure EXACT is set to OFF, however.
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform