I have an issue when change from 32 to 64

And it alert on this code:

I have an issue when change from 32 to 64

And it alert on this code:

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..
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.
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)
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.
13 people are following this question.