Solved

MS Access 2010 - Critical Error PtrSafe Attribute

Posted on 2016-11-23
6
22 Views
Last Modified: 2016-11-24
I have developed a database for MS Access 2010 on my former laptop which was hosting as OS Win7 Pro 64 bit. Today bought a new machine with Win 10 and installed my old MS Office 2010 (and it wasn't at all easy). Once done, I can run the programs but this database when it's opened I get the following error on startup...
Capture.PNG
This database is quite important for us and I'd be obliged if anyone would be able to hint any way around this issue. Thanks.
0
Comment
Question by:nsiotto
  • 3
  • 2
6 Comments
 
LVL 57
ID: 41899833
That would be correct.  The "bitness" their talking about is not that of the OS, but of Office.

Starting with 2010, Office comes in a 32 and 64 bit edition.  There are no major differences other than 64 bit lets you work with larger spreadsheets in Excel, Projects in MS Project, and designs in Visio.

However there is a lack of drivers and controls for 64 bit Office, so unless you need it specifically, it's best to stick with 32 bit, which is what I would suggest you do (and so does Microsoft).

However if you can't, then you'll need to update your DB by adjusting some of your calls.  Your also going to have to decide if you want to keep two versions, or have one version that works in both.  For the latter, you'll need to use complier constants.

To get started, you'll need to look the following:


Compatibility Between the 32-bit and 64-bit Versions of Office 2010
http://msdn.microsoft.com/en-us/library/ee691831(office.14).aspx

Make sure you read the section "Introducing the VBA code base"

This is all the new 64 bit calls added in windows and shows you what all the declares need to look like:

http://www.microsoft.com/download/en/confirmation.aspx?displaylang=en&id=9970

This is list of all the calls that were modified for 64 bit:
http://msdn.microsoft.com/en-us/library/aa383663(VS.85).aspx

Last, a code inspector for 64 bit that will tell you what needs updating in your code:

Microsoft Office Code Compatibility Inspector user's guide
http://technet.microsoft.com/en-us/library/ee833946.aspx

Jim.
0
 

Author Comment

by:nsiotto
ID: 41899840
Thanks for the input Jim
I will inject myself with plentiful of patience and will go through the links you have copied.

However, this program was made on a 64bit Win 7 Pro. Over here it's still 64bit but Win 10. So It makes no sense to bring up some 64bit incompatibility. Does it?
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 41899900
<<However, this program was made on a 64bit Win 7 Pro. Over here it's still 64bit but Win 10. So It makes no sense to bring up some 64bit incompatibility. Does it?>>

  Yes it does.  It's not the OS here that is important, but the version of Office.  Office comes in two different editions, 32 and 64 bit, both of which run under a 64 bit OS.

 What's happened is that the DB was originally developed under a 32 bit Office, but your now trying to run it with a 64 bit Edition.   Because of that, all calls are expected to be 64 bit.

Jim.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 13

Expert Comment

by:John Tsioumpris
ID: 41900118
Given the fact that your Access Application is doing "more" than the "average Access Application"...i see on the screenshot a TWAIN handler module....you should forget 64-bit Office and go to the plain 32bit versions.....or else the patience that you are going to need to tackle the 32 to 64bit conversion and more important to keep up with future upgrades - enhancements would colossal compared to the time spend to read Jim's links
0
 

Author Closing Comment

by:nsiotto
ID: 41900138
Jim, your answer solved my issue. I have uninstalled this version and searched (which I have eventually found) the 32 bit and installed. Now working smoothly. Thanks a lot.
0
 
LVL 57
ID: 41900355
Good to hear you went that route.   As John pointed out, with things like TWAIN drivers in the mix, a 64 bit conversion would have been an uphill battle and one that might not be winnable.

There is a real lack of 64 bit drivers for most things.

Jim.
1

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Outlook Free & Paid Tools
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 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

13 Experts available now in Live!

Get 1:1 Help Now