Results 1 to 4 of 4
  1. #1
    tengelmann is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    3

    Access 2010 Run Time Version

    Hi there,

    I have a database application which uses external data from an Microsoft SQL Server.
    I made the database application and all the programming in Microsoft Access 2010, 64-bit version.


    Everything works fine in the native Access enviroment, on my computer running Windows 8.1.

    When I try to run the same database file in Microsoft Access 2010 Run Time Version (32-bit) , on other computer in the same network, but having as operating system Windows 10 Professional 64-bit, I always get an error. Better told, my application blocks, it does not display any data.

    I don't find an Access Runtime Version for Windows 10 (yet).

    Could enyone tell me, why my application does not run correctly under Windows 10 ?
    Thanks in advance.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    To run some things in Access between 32 bit and 64 bit you have to use PTRSAFE, I don't know if this will solve your issue or not but I've run into it and solved it (for a specific reference) using this snippet. In this case there was a version issue and a 32/64 bit issue but this solved it. You'd have to adapt it for the driver that is bombing out on you if it's different than the one that was causing me issues.

    Code:
    #If VBA7 Then    Private Declare PtrSafe Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As LongPtr
        Private Declare PtrSafe Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpValueName As String, lpcbValueName As Long, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
        Private Declare PtrSafe Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
    #Else
        Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
        Private Declare Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpValueName As String, lpcbValueName As Long, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
        Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
    #End If
    
    
    Const HKEY_CLASSES_ROOT = &H80000000
    Const HKEY_CURRENT_USER = &H80000001
    Const HKEY_LOCAL_MACHINE = &H80000002
    Const HKEY_USERS = &H80000003
    Const ERROR_SUCCESS = 0&
    Const SYNCHRONIZE = &H100000
    Const STANDARD_RIGHTS_READ = &H20000
    Const STANDARD_RIGHTS_WRITE = &H20000
    Const STANDARD_RIGHTS_EXECUTE = &H2000
    Const STANDARD_RIGHTS_REQUIRED = &HF0000
    Const STANDARD_RIGHTS_ALL = &H1F0000
    Const KEY_QUERY_VALUE = &H1
    Const KEY_SET_VALUE = &H2
    Const KEY_CREATE_SUB_KEY = &H4
    Const KEY_ENUMERATE_SUB_KEYS = &H8
    Const KEY_NOTIFY = &H10
    Const KEY_CREATE_LINK = &H20
    Const KEY_READ = ((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))
    Const REG_DWORD = 4
    Const REG_BINARY = 3
    Const REG_SZ = 1

  3. #3
    tengelmann is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    3
    Hi there,
    Thank you very much for the help.
    Just one more question: where should I insert this code above ? To the General Declaration section ? Or some elsewhere ?
    Have a nice day !

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I am not saying this code will work for you, this is usually related to a driver that works in one version of access and not another. So you may have to adapt this for your situation. This code is inserted on my 'main' form, right under the 'option explicit' or 'option compare' statement at the top of your code. Keep in mind in my version of the database there is only one form with multiple tabs. I have not tried to adapt this code for a database with multiple forms and whether or not these have to be set up for each form. I suspect not, but that is also a guess.

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

Similar Threads

  1. Replies: 5
    Last Post: 07-07-2015, 01:35 PM
  2. Replies: 17
    Last Post: 06-06-2013, 05:52 PM
  3. Replies: 2
    Last Post: 03-07-2013, 06:35 PM
  4. Replies: 5
    Last Post: 10-28-2011, 12:12 PM
  5. Replies: 2
    Last Post: 12-23-2010, 09:11 AM

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