Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stepping through field names myfield1, myfield2, myfield
Message
From
01/03/2000 10:45:30
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00339788
Message ID:
00339809
Views:
23
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?

Thanks

>Loop with the FIELD() command.
>
>>I have a db table that has a series of fields like this....
>>
>>myfile.butn1
>>myfile.cap1
>>myfile.butn2
>>myfile.cap2
>>myfile.butn3
>>myfile.cap3
>>...
>>
>>I have a command that needs to be run on each field in the table...
>>
>>thisform.butn1.caption="\<1"+chr(13)+trim(myfile.cap1)
>>thisform.butn2.caption="\<2"+chr(13)+trim(myfile.cap2)
>>thisform.butn3.caption="\<3"+chr(13)+trim(myfile.cap3)
>>
>>can this be looped somehow using a FOR or something similar to step through the
>>all the fields replacing the #'s above with a variable or something? This is a simple
>>example but a couple other methods are going to have multiple commands for each
>>field in the file (all commands are the same for each field except for the field names
>>switching
>>
>>Thanks
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform