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

Gustav Brock Gustav at cactus.dk
Wed Dec 14 02:11:59 CST 2011


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. 





More information about the AccessD mailing list