Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-07-11
3
Medium Priority
?
2,199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 1500 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 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