Solved

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

Posted on 2016-10-15
9
34 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 2

Expert Comment

by:Kyu Lapiz
Comment Utility
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)
Comment Utility
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 18
Comment Utility
adding on to Dales comment:
you can use 32-bit Office on 64-bit Windows
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 18
Comment Utility
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)
Comment Utility
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

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

9 Experts available now in Live!

Get 1:1 Help Now