[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2012-08-16
Medium Priority
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:Gary Samuels
LVL 40

Accepted Solution

als315 earned 1200 total points
ID: 38301913
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 800 total points
ID: 38302238
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:


Expert Comment

by:Elena Quinn
ID: 41061206
This was quite helpful to me.  Thanks.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

873 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