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

William Benson (VBACreations.Com) vbacreations at gmail.com
Thu Dec 15 08:14:39 CST 2011


Uh, yes it was, thanks Jim D. on Dec 13.

-----Original Message-----
From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] 
Sent: Thursday, December 15, 2011 9:11 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Form Lifetime Control Limit (Was: Advice on
A2010....)

Was it mentioned that the control count hits 1040 before erroring out in
Access 2010:

Microsoft Access can't create any more controls on this form or report.
Database13
Control  Count: 1040


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kenneth Ismert
Sent: Wednesday, December 14, 2011 6:11 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Form Lifetime Control Limit (Was: Advice on
A2010....)

Try this:

1. Use TestControlLifetimeLimit() to fully populate a form.

2. Save as "Form1"

3. Delete the FIRST 400 controls.

4. Run TestControlLifetimeLimit(Forms(0)). Note that it can't add any more
controls.

5. Close the form. Run these commands:
     application.saveastext acForm, "Form1", currentproject.Path & "\" &
"Form_Form1"
     application.loadfromtext acForm, "Form1", currentproject.Path & "\" &
"Form_Form1"

6. Design the form. Run TestControlLifetimeLimit(Forms(0)).

Here I predict two things:
A. This will fail for Access 97 forms, even those imported into a later
version of Access. This is the classical 'lifetime limit' error.
B. This will succeed for forms created in A2K or later.

So, for the authors of EatBloat, I would modify their documentation to say:

For Forms & Reports created in Access 2000 or later:
> SaveAsText/LoadFromText will reset the control count, allowing you to add
> more controls up to the version control limit.
> For Forms & Reports created in Access 97 or earlier:
> SaveAsText/LoadFromText will NOT reset the control count. You must edit
the
> ItemSuffix attribute in the text file (and possibly rename controls) to
> reset the control count. This behavior will persist, even if the form is
> imported into a later version of Access.
>

-Ken
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list