Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get value from thisform.x01.value in for-next loo
Message
From
25/07/2006 18:54:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01139981
Message ID:
01139984
Views:
12
>How can you get the value of a form object while in a for-next loop? I have 42 objects (x01 thru x42) and I need to know the value of the x?? that matches the value of the for-next count. I've tried using &variable and (variable) with the code inside but can't make it work. Any Help?
for i = 1 to 42
  obj = eval("ThisForm.x" + padl(i, 2, "0")
  obj.Top = ...
  obj.Caption = ...
  ...
next
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform