Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-10-15
9
Medium Priority
?
105 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 49

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
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.

 
LVL 49

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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

916 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