Solved

Error: The control or subform control is too large for this location.

Posted on 2006-07-11
3
1,949 Views
Last Modified: 2012-06-27
We have a legacy database application written in Microsoft Access 2003.  The system has been in use for years.  Several of our users have recently received new laptops (Dell D610).  With these new laptops, the users are now receiving the error message "The control or subform control is too large for this location" when they attempt to open some forms in the application.  Only users of this model of machine are receiving this error message.  I have made sure that the same version of Access is on these new machines.  Only machines of this model are having the problem.  I also verified that Windows fonts are the same as on other machines.  Any help would be appreciated.
0
Comment
Question by:jsprenk55
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 500 total points
ID: 17083811
my guess is that you will find code behind the form(s) that looks something like ...

Private Sub Form_Resize()
    Me.ControlName.Width = 2878
End Sub

You should be OK by telling access to ignore the "too small error"

Private Sub Form_Resize()
On Error Resume Next
    Me.ControlName.Width = 2878
End Sub


0
 
LVL 39

Expert Comment

by:stevbe
ID: 17083860
You see this kind of erro when a dev hardcodes a specific size instead of using runtime size

if I was to make by comments textbox display across the entire width of the form ...

Private Sub Form_Resize()
On Error Resume Next
    Me.txtComment.Width = Me.InsideWidth
End Sub

if I also want it to fill the space from it's current top locatio to the bottom of the screen ...
Private Sub Form_Resize()
On Error Resume Next
    Me.txtComment.Width = Me.InsideWidth
    Me.txtComment.Height = Me.InsideHeight - Me.txtComment.Top
End Sub

it can get a bit more complex if you have a header sections ...
    Me.txtComment.Height = Me.InsideHeight - (Me.txtComment.Top + Me.Sections(acHeader).Height)

and then you amy also have a footer section ...
Private Sub Form_Resize()
On Error Resume Next
    Me.txtComment.Width = Me.InsideWidth
    Me.txtComment.Height = Me.InsideHeight _
                                         - Me.txtComment.Top _
                                        + Me.Sections(acHeader).Height) _
                                        + Me.Sections(acFooter).Height)
End Sub


Steve
0
 

Author Comment

by:jsprenk55
ID: 17091181
I took your recommendation to just ignore the error.  I added the below code to the program.  Thanks.

Err_Form_Load:
' The below if statement was added when we acquired the Dell D610 computer.  The error message would only appear on this model machine.
' The error message that was appearing was "The control or subform control is too large for this location".  By adding the below if statement
' This message will be suppressed and ignored.
    If Err.Number = 2100 Then
        Resume Next
    End If
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

867 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

22 Experts available now in Live!

Get 1:1 Help Now