VB6-Dynamic Control Creation 
Author Message
 VB6-Dynamic Control Creation

I have a VB6 project where I would like to create a checkbox at runtime
for each record in a recordset.  When I loop through the recordset and
set the name paramater of the controls.add method with a variable, I
keep getting a "Not a legal object name".  The naming convention I use
is: "chk" & strid.  

These create the error
Form1.Controls.Add "VB.CheckBox", "'" & strChkBoxName & "'", Frame1
Form1.Controls.Add "VB.CheckBox", strChkBoxName, Frame1

If I change it to this, I can only add 1 control
Form1.Controls.Add "VB.CheckBox", "chkObj1", Frame1

Is it possible to create a checkbox for each record in a recordset?

Thank you
Mary Jo

Fri, 28 Sep 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Dynamic Controls Creation and Referencing the new Control.

2. Dynamic Control Creation, Controls object has no .Add ???

3. Dynamic Creation of Menu's in VB6

4. Dynamic creation of web controls in VB.NET

5. Dynamic Control Creation - Expand Form?

6. Dynamic Creation of Controls

7. Dynamic control creation

8. Dynamic control creation and calling DOS programs from VB.

9. dynamic creation of controls?

10. Dynamic control creation-HOW???

11. Dynamic creation of Control Array on a SSTab

12. Dynamic creation of Controls


Powered by phpBB® Forum Software