[AccessD] AccessD Digest, Vol 107, Issue 18

Brad Marks BradM at blackforestltd.com
Mon Jan 23 19:48:53 CST 2012


Ken,

Thanks.

I was sleeping in class when this was first presented.

Brad


-----Original Message-----
From: accessd-bounces at databaseadvisors.com on behalf of Kenneth Ismert
Sent: Mon 1/23/2012 6:20 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] AccessD Digest, Vol 107, Issue 18
 
Recaping 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.

Caveat: if your form was created in A97, properly fixing the problem is
much harder.

And, responses to other posts:

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
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the AccessD mailing list