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

Jim Dettman jimdettman at verizon.net
Wed Dec 14 13:15:02 CST 2011


  No, that's not the case.  When I ran the tests, it didn't matter if I did
text and label controls or just text controls as I would get the same number
of total controls either way.

  I had been testing to see if the type of control affected the out come
(because of the difference in the number of PEM's) in the total number of
controls, but it didn't (at least not for text vs label vs all text, which
should have been different enough to show up).

  And it doesn't seem like the naming is related to the limit.  The tests
for A2000 and up all yielded control names >754 and A2007 and up went from
three to four positions for the numeric portion of the naming.  That means
you would be able to get 9,999 controls for each control type without a
conflict in names.  However the numeric suffix counter applies to all
controls, so you should be able to get to 9,999 without a problem, but the
limit is far short of that.

  I don't think it's related to the storage method either; all the numbers
are odd (not 256, 512, 1024, etc).  You just can't come up with any number
of bits that represent the numbers shown.  Only possibility is the one Ken
raised where internal objects are using some of the mapping (ie. 1024 - x
number of internal objects = objects available to you). 

  But it seems more related to internal memory management then it does to
anything else we've seen so far as the value seems to float from version to
version.  It's like the table ID limit which also floats a bit; one minute
you can be fine with a query or form and the next you get an "out of memory"
message.

  What I'd really like to see happen is those test numbers change a bit on
the same machine or between machines.  That would really imply that it's
related to memory management.  A hard coded limit or a limit based on the
storage method would always be consistent no matter when or where checked.

Jim.   

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, December 14, 2011 10:16 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Form Lifetime Control Limit (Was: Advice on
A2010....)

I would bet you will find that each type of control can have that limit of
controls IOW 750 labels 
(not connected to a text box) 750 text boxes, 750 radio buttons, 750 combos
etc.  Each control has a 
different name prefix and thus there will be no collision between names for
text boxes and combo 
boxes and radio buttons.

John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it

On 12/14/2011 8:24 AM, Jim Dettman wrote:
>
>    BTW, one of the things I did try was creating text only controls rather
> then a text/label combination.  Got the same results, but other control
> types might yield different numbers. If they do, then the limit would seem
> more related to object management rather then some inherent limitation
with
> form objects themselves (in terms of storage).
>
>    I'll play with that today if I have time.
>
> Jim.
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
> Sent: Wednesday, December 14, 2011 03:12 AM
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Form Lifetime Control Limit (Was: Advice on
> A2010....)
>
> Hi Jim
>
> For Access 2.0 it runs to:
>
> Field652       Text653
>
> then exits with an "out of memory" error.
> Code must be modified to:
>
> <code>
> Sub CheckControlCreation ()
>
>    Dim frm As Form
>    Dim ctlText As Control
>    Dim ctlLabel As Control
>    Dim intK As Integer
>
>    ' Create form based on Customers form.
>    Set frm = CreateForm()
>
>    For intK = 1 To 2000
>
>      ' Create unbound default-size text box in detail section.
>      Set ctlText = CreateControl(frm.Name, 109, 0, "", "", 100 + intK, 100
+
> intK, 200, 200)
>
>      ' Create child label control for text box.
>      Set ctlLabel = CreateControl(frm.Name, 100, 0, ctlText.Name, "", 100,
> 100)
>
>      Debug.Print ctlText.Name, ctlLabel.Name
>
>    Next intK
>
> End Sub
> </code>
>
> /gustav
>
>
>>>> jimdettman at verizon.net 14-12-2011 02:30>>>
> Ken,
>
> <<A Google search revealed that the 754 limit is very widely quoted, and
> even
> Microsoft's own page repeats this figure:>>
>
>    Yes, it's been out there for many years.  It was sometime in the
A95/A97
> timeframe that I first saw it documented.  A quick check of the A2 manuals
> (yes, they are still on the shelf) does not have it listed as part of the
> specs.  Unfortunately I don't have it loaded to test.  Disks are still
> around somewhere but it's not worth the effort.
>
> <<So, I still think my theory stands -- but the numbers are correct only
for
> Access 97. Does anybody have an ancient version of Access 97 they can test
> this on?>>
>
>    For A97 I got 752.
>
>    Still would like to know how it even started out as 754.
>
> Jim.
>
>

-- 
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