Results 1 to 11 of 11
  1. #1
    KMulvey is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2019
    Posts
    12

    Error Number 2950 Troubleshooting

    I am a novice access user and have encountered an issue with a database that was created years ago and operated as expected up until now. The unexpected error originally occurred when clicking a button that generated a single step macro with action to OpenForm. The error message read, "Too many fields defined." When clicking "OK" a window is generated indicating the Error Number, "2950". The same issue occurs when trying to manually open the form through the All Access Objects panel.



    After some brief google searching, I found a common fix for this issue was setting a trusted location for the database. I completed this process but it did not resolve the issue. The same errors still occur. Does anyone have any suggestions for resolving this issue?

    Any assistance appreciated!

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    a form can only have so many fields (i dont know the limit) but then it chokes and throws that error.
    make the form show few fields. You may need it to show it in 2 parts, or just as a datasheet.

  3. #3
    KMulvey is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2019
    Posts
    12
    I dont think it is related to the amount of fields on the form, the form is broken down into different tabs. Also, it has been working for over four years as originally designed. Any other troubleshooting suggestions?

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Let's try some fact finding questions.
    How many controls have ever been on the form (lifetime limit is 754; deleting a control does not get you back 1 in the count)?
    What are the Access versions for where it was created vs where you are trying to open the form (i.e. are they the same)? If not, check for missing references in both versions.
    Are they both the same bit version (32 or 64)?
    If all that is good, what happens if you copy all the controls to a new form?

    Macro related questions are often a problem as experienced developers don't use them much, thus my/our knowledge is usually somewhat limited.

    EDIT - what are you calling a tab? A page on a tab control? A tab on a navigation form?
    If a nav form, did you recently add this form to a navigation form and that's when it stopped working?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    KMulvey is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2019
    Posts
    12
    Thanks for your continued assistance!

    For controls, there are 16 on the initial form (named splash) where the button is around 200 controls on the form that is being opened (named all GPRA) with the macro.
    The access versions are the same, Access 2013.
    They are both the same bit version, 64.

    I tried copying all the controls to a new form on the original form (named splash) and the same error was generated.

    I also tried creating a new control on the original form (named splash) and the same error was generated.

    I believe when I am referring to a tab, I mean a page on a tab control.

    Let me know what you think!

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    KMulvey,

    Here's a routine that will count the controls on each form.
    It may be useful.

    Code:
    ' ----------------------------------------------------------------
    ' Procedure Name: GetFormControlCounts
    ' Purpose: Routine to Count Controls on Each Form in Database and
    '          output to Immediate window
    ' Procedure Kind: Sub
    ' Procedure Access: Public
    ' Author: Jack
    ' Date: 29-Jan-20
    ' ----------------------------------------------------------------
    Sub GetFormControlCounts()
    
    10        On Error GoTo GetFormControlCounts_Error
              Dim frm As Object
              Dim ctl As Control
              Dim lngCount As Long
              Dim fCount As Long
    20        For Each frm In CurrentProject.AllForms
                  ' If frm.name Like "*Text*" Then
                  '   Debug.Print vbCrLf & "Form: " & frm.name
    30            lngCount = 0
    40            DoCmd.OpenForm frm.name, acDesign, , , , acHidden
    50            fCount = fCount + 1
    60            For Each ctl In Forms(frm.name).Controls
    70                lngCount = lngCount + 1
                      '            Debug.Print lngCount & "  " & ctl.name   'for  testing
    80            Next ctl
    90            Debug.Print fCount & "  " & frm.name & Space(50 - Len(frm.name)) & " has " & lngCount & "  controls"
                  'End If
    100           DoCmd.Close acForm, frm.name
                  ' If fCount > 100 Then Exit Sub  'for testing
    110       Next frm
    120       Debug.Print vbCrLf & vbTab & "**********  GetFormControlCounts Finished ******"
              
    130       On Error GoTo 0
    140       Exit Sub
    
    GetFormControlCounts_Error:
    
    150       MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure GetFormControlCounts, line " & Erl & "."
    
    End Sub


    Sample output
    Code:
    ......
    87  frmCompare2TableStructures                         has 7  controls
    88  frmDocVisits                                       has 5  controls
    89  frmDogSireDamAssignment                            has 10  controls
    90  frmEATBloatV4                                      has 118  controls
    91  frmMikeUtterAccess                                 has 7  controls
    ...

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Let me know what you think!
    Might be a good idea to try that code and post the count. At the moment I'm kind of clueless if you copied all the controls to a new form and still get the error - especially if that still occurs when opening the form from the objects panel on the left. Not sure about the macro part (if it really is a macro) unless it runs anyway when you open the form directly from the objects panel. Maybe macros have a lower tolerance for form control count.

    You might have to post a db copy to get this figured out.

  8. #8
    KMulvey is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2019
    Posts
    12
    Hello,

    Could you please provide me with some instructions to run the code? Again, very novice user here and I typically use the wizards to create and manage access.

    I am starting to think that is issue is more caused by queries than the macro. The macro may not be running, resulting in error 2950 due to query issues that are based on a form. When I try to open the queries from the left panel I get the same error message, "Too many fields defined".

    What I don't understand is how this database could work perfectly last week and it result in error this week with no changes made...

  9. #9
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Do you have any modules in your database?
    Regardless,
    -create a module,
    -copy and paste the code provided into that module
    -put your cursor anywhere in the code and click your mouse
    -go to top of window and click the little green arrow.

    Click image for larger version. 

Name:	greenarrow.PNG 
Views:	12 
Size:	12.1 KB 
ID:	40772

    Code should run and display results in the immediate window.
    Good luck

  10. #10
    KMulvey is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2019
    Posts
    12
    Thank you for the steps, worked well! I ran the code and here are the results:

    1 Assessment of Recovery capital has 69 controls
    2 Adult Brief Psy Scale Form has 44 controls
    3 Discharge form has 67 controls
    4 Followup GPRA has 337 controls
    5 Referral Form has 83 controls
    6 Satisfaction Survey has 48 controls
    7 splash has 27 controls
    8 ALL GPRA has 455 controls
    9 INTAKE GPRA has 400 controls
    10 splash2 has 27 controls

    ********** GetFormControlCounts Finished ******


    Looks like the ALL GPRA and INTAKE GPRA forms have too many controls. I don't know how that happened because there have been no changes. Any suggestions on how to resolve?


  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Updates seem to have adverse effects to something that worked before. I think the issue may be the query based on what you just posted. The count wasn't useless information but it's not entirely useful. If you removed 400 controls, saved the form and then added them back the lifetime count would be 800 but that code will report 400. As I said the lifetime count is what matters.

    Copy the query and remove several fields at a time until it opens without error and report the original number and working number of fields.

    My guess is that your db design is flawed and that is the root of your problem and problems to come.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cannot get rid of a 2950 error
    By ineuw in forum Access
    Replies: 4
    Last Post: 06-17-2016, 03:09 PM
  2. Error number 2950
    By azhar2006 in forum Forms
    Replies: 1
    Last Post: 07-08-2014, 03:34 PM
  3. Action Failed: Error Number: 2950
    By keen1598 in forum Reports
    Replies: 5
    Last Post: 03-29-2013, 03:20 PM
  4. Replies: 6
    Last Post: 07-21-2010, 11:47 AM
  5. Action Failed -Error Number: 2950
    By Cindy in forum Access
    Replies: 5
    Last Post: 07-07-2010, 11:51 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums