Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding objects dynamically
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01308987
Message ID:
01308994
Views:
7
>>>I'd like to add check boxes to a form based upon the number of records in a table (listing individuals who may or may not receive an auto email). I did this before on a previous job, so I know it's not a difficult job, but I was unable to take my code with me to use for examples, and three years later cannot recall the technique.
>>>
>>>Can anyone out there help?
>>
>>select myTable
>>lnI = 0
>>scan
>>  lnI = m.lnI + 1
>>  thisform.NewObject('chk' + transform(m.lnI), 'myCheckBoxClass','myClasslib')
>>  with evaluate('thisform.chk' + transform(m.lnI))
>>     .top =
>>     .left =
>>     .visible = .t.
>>  endwith
>>endscan
>>
>>From the top of my head.
>
>That's what I was looking for. Thanks so much.

You're welcome.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform