locked
Error number changed between Access 2013 and Access 2016 RRS feed

  • Question

  • If you try to load a ribbon twice, you get different error numbers (Err.Number) in Access 2007-2013 and Access 2016.

    For example, if you execute the following method twice:

    Public Sub RibbonErrorTest()
    
        Dim xml As String
        xml = _
            "<?xml version=""1.0"" encoding=""UTF-8""?>" & _
            "<customUI xmlns=""http://schemas.microsoft.com/office/2006/01/customui"">" & _
            "  <ribbon>" & _
            "    <tabs>" & _
            "      <tab id=""test_ribbon_tab"" label=""Test Ribbon"">" & _
            "      </tab>" & _
            "    </tabs>" & _
            "  </ribbon>" & _
            "</customUI>"
        
        Application.LoadCustomUI "test_ribbon", xml
    
    End Sub

    you get the following error message in Access 2007-2013 (sorry for the localized error message):

    Error 32609

    and the following message in Access 2016 (tested with Office 2016 Version 1705 Build 8201.2102 Click-to-Run):

    Error 32610

    The same issue can be observed when adding an error handler and checking Err.Number: Access 2007-2013 return 32609, Access 2016 returns 32610. (This is actually how we discovered this issue.)

    This is ... quite inconvenient, since this is a breaking change for custom error handlers. (Yes, I know it's bad practice to use error handlers for control flow, but we all know that there are cases where Access leaves you no other choice.)

    Is this change documented somewhere? Is this just a "glitch" in LoadCustomUI or are there other error number changes that we should be aware of when adding Access 2016 to the list of Access versions supported by our application?

    Thanks, best regards
    Heinzi


    • Edited by Heinzi.at Tuesday, June 20, 2017 1:05 PM
    Tuesday, June 20, 2017 1:04 PM

All replies

  • Yes, it's a pain when error numbers change, but I've seen that happen many times over the 20+ years that I have been developing Access applications. In fact, I've had the same error throw completely different numbers and descriptions within the same version. I don't know if it's timing, other processes running or just nonsense.

    And I've never seen any documentation on error numbers even thought that would be extremely helpful.


    Bill Mosca
    www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Tuesday, June 20, 2017 2:46 PM
  • Hi Heinzi.at,

    I can reproduce the issue and can see that error number get changed for the same error.

    Access 2013:

    with Access 2016:

    you had asked,"Is this change documented somewhere?"

    currently this change is not documented anywhere.

    if you think that this type of error number changes should be documented then please try to submit your feedback to Access use voice.

    Welcome to Access Suggestion Box!

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 21, 2017 12:55 AM
  • Hi Deepak!

    Thank you for confirming this issue.

    As you suggested, I have created a few uservoice entries:

    Best regards
    Heinzi

    Wednesday, June 21, 2017 8:04 AM
  • I did some further research on this issue and compared the values returned by Application.AccessError on Access 2007-2013 and 2016.

    Apparently, Access 2016 introduced a new error 32607, which is related to the new Large Number feature. In the process of doing so, they shifted all existing error messages in the range 32607-32682 by one, i.e. they now have error numbers 32608-32683!

    Since large numbers are a feature which has been added to Access 2016 in the 1703 feature update (Build 16.0.7967.2139), I also tested a stock Access 2016 without any updates (Build 16.0.6001.1073), and, sure enough, the error numbers correspond to Access 2013.

    So, this is not a change between Access 2013 and 2016; it's actually a (probably unintended?) in-version change between Access 2016 pre-1703 and Access 2016 post-1703.

    Best regards
    Heinzi

    Friday, June 23, 2017 10:50 AM
  • Hi Heinzi,

    Thanks for sharing the information.

    Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 26, 2017 6:07 AM