Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I update a 32-bit MS Access database to 64-bit?

Posted on 2016-10-15
9
Medium Priority
?
95 Views
Last Modified: 2016-11-08
I created and use a database built with the 32-bit version of Access 2007.

My hard drive started to fail and was replaced with a Solid State Drive for applications and a new drive for data.

I now use the 64-bit version of MS Access 2016.

When I run the database I get the following error at line:
Declare Function TSGGetKeyState% Lib "user32.dll" Alias "GetKeyState" (ByVal nKey%)

Compile error:  The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PrtSafe attribute.

How do I do this?
0
Comment
Question by:bobbat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 3

Expert Comment

by:Kyu Lapiz
ID: 41845361
Hi,

Please check the link below and let me know if it fixes the error.

https://support.microsoft.com/en-ph/kb/983043
0
 
LVL 48

Assisted Solution

by:Dale Fye
Dale Fye earned 1000 total points (awarded by participants)
ID: 41845533
If you can go back and use the 32 bit version of Office, I would recommend it.  Along with the 64 bit issues you will have with API calls, there are very few ActiveX controls available (except from 3rd parties) for the 64 bit version, including no treeview or listview.

HTH
Dale
1
 
LVL 22
ID: 41845687
adding on to Dales comment:
you can use 32-bit Office on 64-bit Windows
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 48

Expert Comment

by:Dale Fye
ID: 41845963
BTW,  the only reason I know anyone that really needs 64 bit Office is because they need the ability to do math with extremely large numbers (generally in Excel).  Most of us just don't need 64 bit Office.
1
 
LVL 22
ID: 41845965
or have extremely large workbooks (Excel again) ... of course, by the time they get THAT big, they should probably be in Access ;)
1
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 1000 total points (awarded by participants)
ID: 41846432
You'll need to update the API call's and use complier constants along with the pointer safe attribute.

Here are all the references that you need to sort through this:

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

and read the section "Introducing the VBA 7 Code Base" carefully.

also, if you want all the new 64 bit calls:

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

There is also a code inspector for 64 bit:

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

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

JimD.
0
 
LVL 58
ID: 41846434
and by the way, I would follow Dale's advice and avoid 64 bit if possible.   It's still better to go with 32 bit.

But I do understand it's getting harder and harder to avoid it.   Sooner or later, were all going to have to make the switch.   Don't think were quite at that point yet though.

Jim.
0
 

Author Comment

by:bobbat
ID: 41852354
I put PtrSafe in the Declare statements and everything works.

Thank you.

More about our charity at:
https://www.facebook.com/bhfer/?fref=ts
and
http://bhfer.org/
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
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…

661 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