Solved

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

Posted on 2016-10-15
9
55 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
  • 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 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 250 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 19
ID: 41845687
adding on to Dales comment:
you can use 32-bit Office on 64-bit Windows
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
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 19
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 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 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 57
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article will show you how to use shortcut menus in the Access run-time environment.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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…

830 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