Results 1 to 10 of 10
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097

    32 bit to 64 bit


    I have an app developed in Access 2013 with the app's source as file type mdb. The file is formatted for 2002 - 2003, as I still need to do maintenance on right-click options created prior to 2007 ribbons. My Access 2013 is the 32 bit version, whereas one of my users is running Access 365 64 bit version. When the user opened the front-end mdb file, they were greeted with the message seen on the image included below. I've never personally encountered this condition and, from what I've read so far, it appears that all I need to do is add the "ptrSafe" attribute to the API declares used by the app. Is that all that I need to do?

    Click image for larger version. 

Name:	000.jpg 
Views:	32 
Size:	287.0 KB 
ID:	44595

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Yup. In fact if I was developing anything that uses API's every call would be set up for this. A zillion pages on this topic. Here's one
    https://stackoverflow.com/questions/...64-bit-windows
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    My head just exploded! I only have two sets of declare functions in my app, Terry Kreft's Clipboard code and ShellWait. From what I read, or tried to read, the ptrSafe will give compiler errors if I attempt to compile my A2013 code. I added the ptrSave attribute to just one of the declare statements and compiled without compilation errors, so I'll update the mdb file and try running on one of my user's machines when I have the opportunity on Sunday. My Windows 10 has been on 64 Bit for ages, so I'm still not clear what is triggering the issue?

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Don't go by one thread; read a few at least. AFAIK, if properly written the lines beginning with # will compile regardless of the bit version. I have included them in code before and compiled them in 32 bit. I would 'never' purposefully install 64 bit office for myself.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    I would 'never' purposefully install 64 bit office for myself.
    Yes, I can remember years ago about the evils of 64 bit versions of Office so, like you, I don't install the 64 bit versions. I'll install my app as is with the addition of the ptrSave where needed on Sunday and see what happens.

  6. #6
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    All my A2013 (Program Files(x86)) "Declare Function" statements updated to "Declare ptrSafe Function" and compiled without any errors, the app functioned normally. I'll load the app on a 64 bit (Program Files) A365 on Sunday and post the results.

  7. #7
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Adding PtrSafe will allow it to compile but won't necessarily be enough to make it work correctly.
    For example, if your APIs contain handles/pointers such as hWnd As Long...those will need to be changed to LongPtr.
    E.g. hObject should probably be LongPtr
    Similarly check all your Type declarations for handles/pointers
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  8. #8
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    Thanks Colin, I'll have an opportunity to check that out before the day is out.
    Bill

  9. #9
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    Still trying to gain enough hands-on time of the 64bit Access machine so I can put this caper "to bed". So far, the 64bit system simply complains when the app is launched but continues okay after the initial error message. PtrSafe is absolutely required with the API declares but changing the "As Long" to "As LongPtr" sends the app off the cliff, I'll try to be more specific about that as symptoms are revealed. I've become suspicious that there's a dual installation of OFFICE 365 on the troublesome machines and I'll check that out at next opportunity.

  10. #10
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Why not make use of the 64 bit user's time?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

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