Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object Count in a Form
Message
From
27/04/2001 11:14:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00500662
Message ID:
00500751
Views:
23
Larry is quite right - both thisform.Objects and Thisform.Controls are collections so aLen won't work on them (mutter mutter)

instead you could do -
lnCount = 0
For each loControl in Thisform.Controls
lnCount = lnCount + 1
Next
HTH

Will

>Thanks.... makes sense.
>
>Tommy
>
>>You can reference thisform.objects which gives you a list of all the top level objects in a form (ie it will give you a pageframe but not the pages contained within or any controls in any of the pages)
>>
>>I guess you could do :
>>lnObjectCount = Alen(Thisform.Objects)
>>
>>HTH
>>Will
>>
>>>Hi Ya'll !
>>>
>>>I was checking out some code on the NET... and went to Pinter's site... and was playing with some code there....
>>>
>>>http://www.lespinter.com/ Learning Center #229 Object Oriented Programming In VFP...
>>>
>>>and when I tried the sample code there... it refered to a property called..
>>>
>>>THISFORM.Objectcount
>>>
>>>My VFP 6 did not like that at all!! I tried to search for this property, but no luck....
>>>
>>>What is wrong???
>>>
>>>How do I get a count of the objects in a form then?
>>>
>>>Thanks!!!
>>>
>>>Tommy
Will Jones
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform