Runtime Creation of Dynamic Forms 
Author Message
 Runtime Creation of Dynamic Forms

I'm having problems with a form created using the "CreateForm" function.  This
form serves as a data entry form, which contains a variable number of
textboxes for inputting values.  (Note that because this form is used to
create a batch of new records, which are later added to a table
programmatically, this form is unbound.)

In the module that builds the new form, I've created a number of Collections,
to which I add controls as they're created, to group them logically, to permit
easier calculations over each collection of controls.

The problem is -- I cannot access the elements of these collections once the
newly created form is open in form view.  The Debug window will show these
collections as existing, and the number of items in each collection is
correct, but the items contain no variables.  Prior to entering form view,
each item of these collections displayed the properties of a given control.

I'm assuming that this is a scope problem, but I'm not sure how to resolve it.
 Any suggestions?  (I hope I've explained my problem sufficiently.)

Thanks,

   Eric Adamson
   Michigan State University



Fri, 22 Sep 2000 03:00:00 GMT  
 Runtime Creation of Dynamic Forms

When you are creating the controls the form is opened in Design View, so it
has to be closed and reopened to go to Form View.  When the form is closed,
the variable references the controls in the collections are lost.

Alden

Quote:

>I'm having problems with a form created using the "CreateForm" function.
This
>form serves as a data entry form, which contains a variable number of
>textboxes for inputting values.  (Note that because this form is used to
>create a batch of new records, which are later added to a table
>programmatically, this form is unbound.)

>In the module that builds the new form, I've created a number of
Collections,
>to which I add controls as they're created, to group them logically, to
permit
>easier calculations over each collection of controls.

>The problem is -- I cannot access the elements of these collections once
the
>newly created form is open in form view.  The Debug window will show these
>collections as existing, and the number of items in each collection is
>correct, but the items contain no variables.  Prior to entering form view,
>each item of these collections displayed the properties of a given control.

>I'm assuming that this is a scope problem, but I'm not sure how to resolve
it.
> Any suggestions?  (I hope I've explained my problem sufficiently.)

>Thanks,

>   Eric Adamson
>   Michigan State University




Sat, 23 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Licensing VB Controls for Dynamic creation at runtime

2. Dynamic creation & read-only at runtime props

3. Dynamic menu creation at runtime

4. Dynamic Control Creation - Expand Form?

5. Dynamic Creation of Object Names - Forms

6. Dynamic Form Creation

7. Form dynamic creation

8. Dynamic form creation

9. Grabbing stuff from form / dynamic variable creation (?)

10. Dynamic Forms Creation on the Fly

11. Dynamic Form Creation

12. dynamic form name creation

 

 
Powered by phpBB® Forum Software