Ribbon for 64 bit system

Trinh Nghi 1 Reputation point

I have an issue when change from 32 to 64


And it alert on this code:


Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
846 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. C Data 6 Reputation points

    An Access application built in 32 bit may not operate correctly in 64 bit Office/Access.

    Typically your best solution, and recommended by Microsoft, is to return/reinstall Office as 32 bit [the operating system may still be 64 bit]

    Only large data excel users need 63 bit Office..

    0 comments No comments

  2. ghn 1 Reputation point

    You should do exactly what the err msg is instructing, go to the declarations and add the string PtrSafe in between 'Declare' and 'Function'.

    Than usually works for me in my projects.102321-scrnsht-ptrsafe.jpg

    0 comments No comments

  3. Isladogs 16 Reputation points

    Adding PtrSafe is necessary but not sufficient for API declarations to work in 64-bit
    In addition all instances of Long for handles/pointers such as hWnd need to be converted to LongPtr.
    The 5 memory functions above are incorrect and should be:

    Declare PtrSafe Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As LongPtr) As LongPtr
    Declare PtrSafe Function GlobalFree Lib "kernel32" (ByVal hMem As LongPtr) As LongPtr
    Declare PtrSafe Function GlobalLock Lib "kernel32" (ByVal hMem As LongPtr) As LongPtr
    Declare PtrSafe Function GlobalUnlock Lib "kernel32" (ByVal hMem As LongPtr) As Long
    Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As LongPtr)
    0 comments No comments

  4. Daniel Pineault 441 Reputation points MVP

    You should quickly review


    But basically your API declarations all need updating, any ActiveX controls need to be replaced, ...

    It's a choice you have to make, either uninstall a office and reinstall the 32-bit version so your database works as is, or update the database to 64-bit rules.

    0 comments No comments