Solved

MS Access 2003 SubForm Limit

Posted on 2013-01-02
9
724 Views
Last Modified: 2013-01-03
Is there a limit to the number of subforms in MS Access 2003?
I think I read somewhere it's 7...but what does that mean?

Does it mean that THIS would be the limit?
MainForm
SubForm1                                                                       Subform2        Subform3
SubForm1_1    SubForm1_2   SubForm1_3


Or THIS?
MainForm
SubForm1
     SubForm1
          SubForm1
               SubForm1
                    SubForm1
                         SubForm1
0
Comment
Question by:lrbrister
  • 5
  • 3
9 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 38738243
It means the 'Or THIS?"

Embedded = 7 max. Same for SubReports.

mx
0
 

Author Closing Comment

by:lrbrister
ID: 38738246
Thanks
0
 
LVL 57
ID: 38738251
Three levels deep is it too...

Jim.
0
 
LVL 57
ID: 38738264
ah just did a double check and that changed at some point from 3 to 7.  3 was the old limit for nested forms.

BTW, the other way (non-nested) is just a limit on resources available; I'm not aware of any limit there other then 754 controls over the lifetime of a form (which I'm thinking as I'm saying that, has changed as well to over 1200).

Jim.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 75
ID: 38738290
'over 1200'
really ... about time.  

wait ... this spec is still showing 754 ...

http://office.microsoft.com/en-us/access-help/access-2010-specifications-HA010341462.aspx

where did you see this ?

mx
0
 
LVL 57
ID: 38738618
<<where did you see this ?>>

 I actually tested it.  With each release since A97, the number of controls has gone up.

I'll see if I can find the post...I may even have the DB I tested with lying around.

Jim.
0
 
LVL 57
ID: 38740169
OK found my old posts (it is from another developers list):

A2 - 653
A97 - 752
A2000 - 800
A2002 - 894
A2003 - 895
A2007 - 1040
A2010 - 1040

 So the current limit is not as high as I was thinking (1200), but it's 1040 which is well above the published spec.  

 Code that was used to check this is below.  Control type didn't seem to make a difference (I only tested labels and text controls though) as I got the same numbers each way.  This code was also run on multiple machines and verified by different people.  All got the same numbers.

 So apparently the control creation limit is not a hard limit, but based on some other internal constraint.  This is similar to the table ID limit, which is stated as 2048, but actually floats a bit.

  These limits are somehow tied to the way Access internally handles open objects, but what that process is is un-clear.

Jim.

Public 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, acTextBox, acDetail, , , 100 + intK, 100 + intK, 200, 200)

    ' Create child label control for text box.
    Set ctlLabel = CreateControl(frm.Name, acLabel, , ctlText.Name, "", 100, 100)
   
    Debug.Print ctlText.Name, ctlLabel.Name
 
  Next intK

End Sub
0
 
LVL 75
ID: 38740699
How funny ... imagine - a spec that Microsoft has wrong. I wonder how many others of off ?
Interesting difference between A2002 and A2003 .... one control.

mx
0
 
LVL 57
ID: 38741026
I think the spec was written at the time of A95/A97 (that's when it first appeared), and has simply been carried forward without anyone really checking it.

Meanwhile, the process that's involved with the limit has evolved over time and allows more.  Whether that's by design or just a by-product of other changes is hard to say.

 Seems strange too that it's gone up in every release, so my guess it's a result of something else.

 and the really weird part; no where did we come up with 754!

Jim.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now