Ribbon for 64 bit system

Trinh Nghi 1 Reputation point
2021-02-22T13:22:11.823+00:00

I have an issue when change from 32 to 64

70679-error.jpg

And it alert on this code:

70610-code-error.jpg

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
    2021-03-01T23:14:00.807+00:00

    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
    2021-06-04T04:33:28.88+00:00

    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
    2021-07-10T19:56:03.873+00:00

    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
    2021-07-11T10:45:06.903+00:00

    You should quickly review

    https://www.devhut.net/2017/04/13/access-x32-vs-x64-compatibility/

    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