VBA 64-bit All Declare Statement must now include the PtrSafe keyword

Posted on 2012-08-16
1 Endorsement
Last Modified: 2016-02-11
I opened an Access database on a 64-bit machine and received the above error.
How do I add a PtrSafe keyword to a Declare statement?
Question by:garysamuels
    LVL 39

    Accepted Solution

    LVL 56

    Assisted Solution

    by:Jim Dettman (Microsoft MVP/ EE MVE)
    Note that it's not so much that your on a 64 bit machine, but that you have a 64 bit install of Access.

    If you want the same DB to work in both environments, then your going to need to use complier directives.

    Also, besides the URL's posted by als315, you will probably be interested in these:

    All the new 64 bit calls:

    Code inspector for 64 bit:

    Microsoft Office Code Compatibility Inspector user's guide

    List of all the calls that were modified for 64 bit:

    LVL 1

    Expert Comment

    This was quite helpful to me.  Thanks.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now