• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2117
  • Last Modified:

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

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?
Gary Samuels
Gary Samuels
2 Solutions
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
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:

Elena QuinnCommented:
This was quite helpful to me.  Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now