[AccessD] Form Lifetime Control Limit (Was: Advice on A2010....)

Kenneth Ismert kismert at gmail.com
Fri Dec 9 14:21:53 CST 2011


Stuart, Darryl, Charlotte & Jim:


> Stuart McLachlan:
> ...
> One way to reset the control count  is Application.SaveAsText/LoadFromText.
>

This does not work by itself. You have to reset the ItemSuffix attribute in
the resulting text file before loading it back in. And, you can't have any
controls with default names.

See my earlier post under this topic.

Darryl Collins:
> ...
> In this instance importing the controls into a brand new form DOES help,
> as the control count starts a zero on a new form.
> Many times, on control heavy forms I have used this to get out of bother.
>  Now why they have the limit, and why it doesn't decrease when delete
> controls is a question for someone deep in the MS bunker, Redmond WA USA
>

Try my variation on the SaveAsText/LoadFromText method that I outlined in
my earlier post. I have verified this to work.

Regarding the limit, my theory is that the real limit is 1024, but there
are 270 controls reserved for internal use by the application, leaving 754
for the user.

Charlotte Foust:
> ...
> Copies of the form are full copies with the same limits.  The control
> count is part of the properties of the form, so importing it doesn't change
> a thing.  You can create a new form and copy the controls to it but then
> you have to go through replacing the old form with the new one.
>


> Jim Dettman:
> ...
> Importing into a new DB does not reset the count.  Once you hit the limit,
> all you can do is create a new form and then copy controls into it.  You
> can't add any more controls to the existing form.
>

You both are right that imports and form copies don't reset the count. You
can only copy the controls, code and properties to a new form, or use my
technique.

-Ken



More information about the AccessD mailing list