none
Common Controls RRS feed

  • Question

  • I have a 2016 database that I have installed on client computers. It is running on most without issue but I have two computers that the welcome screen causes the database to give a generic runtime error and close the application. I think it has to do with the Microsoft Windows Common Controls 6.0 (SP6) as it flashes another message really quick before giving the runtime error. I think it might be saying mscomctl but not positive. One machine is windows 10 and the other windows 7. Any way to make sure that the common controls are installed and properly working for the application? I have tried downloading and installing common controls from here

    https://www.microsoft.com/en-us/download/details.aspx?id=10019

    I have tried doing a regsvr32 on mscomctl.ocx and even comctl32.ocx and neither fixed the issue. I am hoping someone here has ran into this before.

    Thursday, March 23, 2017 8:26 PM

Answers

  • You can “try” this bit of code:

    Sub ListReferences()
       Dim refCurr As Reference
       Dim s    As String
      
      For Each refCurr In Application.References
        s = s & vbCrLf
        s = s & refCurr.Name & ": " & refCurr.FullPath & "  ->" & refCurr.IsBroken
        Debug.Print refCurr.Name & ": " & refCurr.FullPath, refCurr.IsBroken
      Next

      MsgBox s
     
    End Sub


    The trick in above is to run it before anything else. So you might use an autoexec macro. Or perhaps just change the start up for to a blank one with a button with above code behind that button.

    You certainly want to reduce all references down to a minimum.

    The best way to find the “min” references is create a blank 2016 database, and look at the resulting references. Any external program such as word, excel, outlook etc. should use late binding code.

    So if you have “more” then what a fresh created database has, then you want to see if some of the references can be removed.

    The base references I get for say 2010 is:

    Visual Basic for Applications
    Microsoft Access 14.0 Object Library
    OLE Automation
    Microsoft Office 14.0 Access database engine Object

    For 2016, of course the above 14.0 will become 16.0.

    So the above is really what you want as a starting point. If you have extra references then you can try deleting one, and then a debug->compile to see if any errors occur.

    Another approach as a last resort is I on several occasions installed full access (but did not activate Access). Then in place of using the accDE (that you distribution), you place the accDB with source code and attempt a debug->compile to ensure that all code compiles. So if you can’t chase down the missing reference, then you well many have to test with a full version to find the missing reference. You then in-install full Access and re-install the runtime.

    Regards,
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada


    • Marked as answer by Dalester Sunday, March 26, 2017 1:20 PM
    Saturday, March 25, 2017 12:44 AM

All replies

  • Are you running the x64 bit version of the application, or the x32 bit version?

    You would thus in theory have to register the x32 version of the common controls.

    (There not an x64 bit version).

    And thus the location of the library would be in C:\Windows\SysWOW64 and NOT c:\windows\system32.

    Despite the “32” in that location – that’s were x64 bit software actually is placed – x32 bit software is found in sysWOW64

    Regards,
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada

    Thursday, March 23, 2017 10:11 PM
  • Albert,

    The database is the 32 bit version of the Access Runtime. When I got onto these machines I did not find a SysWOW64 directory or I would have tried there first. Any other ideas?

    Dale

    Thursday, March 23, 2017 10:34 PM
  • Albert,

    I checked both machines and both are 32 bit versions of windows. As I said one is windows 7 and one is windows 10. In both cases I am not seeing the SysWow64 folder.

    Dale

    Thursday, March 23, 2017 11:37 PM
  • Ok, then you are likely windows x32. (few machines run x32, but often for some PC’s a few years old, you will find windows x32).

    It is possible that this library is not your problem. However, you could download + install the common controls from here:

    https://www.microsoft.com/en-ca/download/details.aspx?id=10019

    The above may well fix your issue – and at least you would know that the library is installed correctly.

    edit: Sorry - I see that you done this already. If the package installed correctly, then this suggests your issue is not this missing library. I would consider checking the references you have in the application on your dev computer.

    Regards,
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada


    Friday, March 24, 2017 5:37 AM
  • Albert,

    Is there a way to code for checking the references and displaying a missing one with vba in a form?

    Dale

    Friday, March 24, 2017 10:55 PM
  • You can “try” this bit of code:

    Sub ListReferences()
       Dim refCurr As Reference
       Dim s    As String
      
      For Each refCurr In Application.References
        s = s & vbCrLf
        s = s & refCurr.Name & ": " & refCurr.FullPath & "  ->" & refCurr.IsBroken
        Debug.Print refCurr.Name & ": " & refCurr.FullPath, refCurr.IsBroken
      Next

      MsgBox s
     
    End Sub


    The trick in above is to run it before anything else. So you might use an autoexec macro. Or perhaps just change the start up for to a blank one with a button with above code behind that button.

    You certainly want to reduce all references down to a minimum.

    The best way to find the “min” references is create a blank 2016 database, and look at the resulting references. Any external program such as word, excel, outlook etc. should use late binding code.

    So if you have “more” then what a fresh created database has, then you want to see if some of the references can be removed.

    The base references I get for say 2010 is:

    Visual Basic for Applications
    Microsoft Access 14.0 Object Library
    OLE Automation
    Microsoft Office 14.0 Access database engine Object

    For 2016, of course the above 14.0 will become 16.0.

    So the above is really what you want as a starting point. If you have extra references then you can try deleting one, and then a debug->compile to see if any errors occur.

    Another approach as a last resort is I on several occasions installed full access (but did not activate Access). Then in place of using the accDE (that you distribution), you place the accDB with source code and attempt a debug->compile to ensure that all code compiles. So if you can’t chase down the missing reference, then you well many have to test with a full version to find the missing reference. You then in-install full Access and re-install the runtime.

    Regards,
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada


    • Marked as answer by Dalester Sunday, March 26, 2017 1:20 PM
    Saturday, March 25, 2017 12:44 AM
  • Albert,

    It was the Mscomctl.ocx having an issue. I unregistered it and then copied a new file from my machine and registered it. That did the trick. Not sure why it did not like the one on the machine since it was only about 3 months older than the one on my machine but it is working now. Thanks.

    Dale

    Sunday, March 26, 2017 1:21 PM