Creating controls programmatically has to be done with caution. If this is a
"one time" thing to modify a form, then there should be no problem; however,
if this is a normal part of your processing, be aware there is a "Life Time"
limit of 754 controls on a form. By that, I mean that each time you add a
control, the count goes up by one, but deleteing a control does not subract
from the count. The end result is that after a period of time, your form
will no longer be usable.
> I found my answer.
>
[quoted text clipped - 13 lines]
> >
> > Daniel
Klatuu,
That should not present a problem for my current application (1 time deal).
However, is there a way to determine the current lifetime count of a form
through vba? Not that is crucial, but is there a reason for this limit?
There is not way to reset the lifetime counter?
Thank you for the heads up, definetly something to keep in mind. I have a
few forms that have been rework tremendously, this may end up posing a
problem down the line.
If a form get to that point, can one simply create a new form and copy over
all the controls to start anew?
Daniel
> Creating controls programmatically has to be done with caution. If this is a
> "one time" thing to modify a form, then there should be no problem; however,
[quoted text clipped - 21 lines]
> > >
> > > Daniel
Douglas J. Steele - 20 Nov 2006 21:04 GMT
There's no way to determine the current lifetime count that I'm aware of,
nor any way to reset the counter (other than copying the form and creating a
new object).

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Klatuu,
>
[quoted text clipped - 46 lines]
>> > >
>> > > Daniel
Klatuu - 20 Nov 2006 21:22 GMT
I don't know what the reason is. It probably relates to some internal limit
Access uses to store information on the objects in the database.
I don't know if there is a way to know the lifetime count. You can find the
number of current controls if the form is open using:
Forms!TheFormName.Controls.Count
You can copy the form to a new mdb and it will loose the lifetime count.
> Klatuu,
>
[quoted text clipped - 37 lines]
> > > >
> > > > Daniel