Solved

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

Posted on 2016-10-15
9
50 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

My experience with Windows 10 over a one year period and suggestions for smooth operation
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

776 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