[AccessD] Questions about the Maximum Number of Controls Added Over the Lifetime to a Form (Access 2007)

Kenneth Ismert kismert at gmail.com
Mon Jan 23 18:24:03 CST 2012


(Re-posting with correct subject)

Recapping the group's earlier thread:


> Brad Marks:
>
> I noticed that there is a maximum of 754 controls that can be added
> over the lifetime to a form.
>

Control Counts by Version (per Jim Dettman):
A97 - 753
A2000 - 800
A2002 - 894
A2007 - 1040
A2010 - 1040

... I don't understand how a person can discern how many have been
> added  "over the lifetime" of the form.
>

Simple: just add a new control to the form. The numeric suffix shows your
current lifetime count.


> Also, if a Form hits this limit, is there an easy way to deal with this
> issue?
>

if you created the form in Access 2000 or later, just use these two lines
of code:

    Application.SaveAsText acForm, "Form1", CurrentProject.Path &
"\Form_Form1"
    Application.LoadFromText acForm, "Form1", CurrentProject.Path &
"\Form_Form1"

Lots simpler and more accurate than creating a new form and copying all
controls and properties over.

And, responses to other posts in this thread:

Gary Kjos:
>    For Each ctl In Me
>        lngCount = lngCount + 1
>    Next ctl
>

Otherwise known as Me.Controls.Count

Stuart McLachlan:
> You can see the Lifetime count if you save the form as text and look for
> ItemSuffix in the
> resulting file.
>
> Here's a quick and dirty function I've just knocked up to do it....
>

This code works, and the results are identical to the 'add a new control
and look at the numeric suffix' method, above.

-Ken



-- 
Ken Ismert
Cell: 832-528-7788
Skype: kismert


More information about the AccessD mailing list