Make Your Microsoft Access Databases Safe with 32-Bit and 64-Bit Versions of Office, PtrSafe
HTML-код
- Опубликовано: 1 авг 2024
- In this video, I will show you how to take your existing 32-bit Access databases and upgrade their VBA code to run under 64-bit Office using the PtrSafe attribute.
Ethan from Hastings, England (a Platinum Member) asks: I just upgraded from 32-bit to 64-bit Office, and my Access database which I have been using for years is now telling me "the code in this project must be updated for use in 64-bit systems. Please review and update Declare statemsnts and then mark them with the PtrSafe attribute." What do I do?
Silver Members and up get access to an Extended Cut of this video. Members will learn a few more things about migrating from 32-bit to 64-bit including the new VBA7 compiler pre-directive for maintaining multiple versions of your database. We'll also talk about the new data types like LongLong and LongPtr, and when you would need to use them, and we'll discuss issues that come up with maintaining multiple versions of your database for 32-bit and 64-bit users, with possible different versions of Access, and with ACCDE files.
MEMBERS VIDEO:
• 32-Bit to 64-Bit Micro...
BECOME A MEMBER:
RUclips: / @599cd
or My Site: 599cd.com/THMember
LEARN MORE:
599cd.com/64bit
LINKS:
Intro to VBA: 599cd.com/IntroVBA
Microsoft 64 Bit Article: tinyurl.com/yznvn5r3
Excellent Page by Philipp Stiefel: tinyurl.com/yzb3kxrj
My 32-bit vs. 64-bit Page: 599cd.com/32v64bit
COURSES:
FREE Access Beginner Level 1: 599cd.com/Free1
$1 Access Level 2: 599cd.com/1Dollar
FREE TEMPLATE DOWNLOADS:
TechHelp Free Templates: 599cd.com/THFree
Blank Template: 599cd.com/Blank
Contact Management: 599cd.com/Contacts
Order Entry & Invoicing: 599cd.com/Invoicing
More Access Templates: 599cd.com/AccessTemplates
ADDITIONAL RESOURCES:
Donate to my Tip Jar: 599cd.com/TipJar
Get on my Mailing List: 599cd.com/YTML
Contact Me: 599cd.com/Contact
TechHelp: 599cd.com/TechHelp
Consulting Help: 599cd.com/DevNet
Twitter: / learningaccess
en.wikipedia.org/wiki/Microso...
products.office.com/en-us/access
microsoft.com/en-us/microsoft...
KEYWORDS:
microsoft access, ms access, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #instruction, #learn, #lesson, #training, #database, microsoft office, 32-bit, 32 bit, 64-bit, 64-bit, declare, ptrsafe, longlong, longptr, Win64, VBA7, sleep function, kernel32
QUESTIONS:
Please feel free to post your questions or comments below. Thanks.
OMG when I moved my DB from old computer to brand new computer I got the exact message. I FREAKED OUT!! Thank you, thank you for posting these videos. Did exactly what you said and yes! I love you Richard.
Love you, too. :)
Hi Janice, were you able to open your old database at all? I can't even open mine.
Thats what exactly happen to me.
Sir, once again you saved my a**! Thank you!
Side note. I could not open the VBA on my computer with 64 bit access on it. I did have to update the code on my computer with 32 bit access first. I then moved that file over to my computer with the 64bit to test and it worked.
Those of you doing this for work purposes I would recommend asking IT for a loaner computer with the 32 bit access so you can make the appropriate changes (or vice versa if your daily driver is already the 32 bit version) That's what I had to do.
You're very welcome. Thanks for sharing your story.
Thank you for this video, it fixed all the declare errors, and the program seems to work now, even though I ran into a different problem called Type Mismatch related to something called CallBack
Type Mismatch: 599cd.com/TypeMismatch
I've been trying to take one of our old Access databases and convert it so that it'll work for 32 or 64 bit. I've got it running for the most part, but when my colleague tested the 64 bit version, it got through the API section of code just fine, but then the first SQL statement the program attempted, with conn.Execute, generated a run-time error:3340, Query is corrupt.
I can't figure out the issue with that.
I can't see why an SQL statement would cause that problem. I'd need to see your code to tell you for sure.
I love your videos. I am a little confused though. I built a db and apparently I have both 32 and 64 bit. When I split the database for others to work on, they weren't even able to open it. They got the error that you mentioned. In other words, the main menu didn't even open. What is the code I need to write to have the database open on their 64 bit machines? Thank you so much
You should all have the same version of Office. Uninstall any 32-bit users and reinstall 64-bit.
Thank you Richard for the Video . What if the other way round , Like Database created in 64 bit & user is using 32 bit, Shall I use the same steps ?
It should work fine unless the developer used 64-bit specific code or data types, which is unlikely. Try it and see. :)
Thanks 👍
How about codes without declare, such as public function? Should I also update it to public declare ptrsafe function?
Sure
does this work in orher versions too? I mean I have a Access 2016 with a 32-bit, ang my client's access is version 2020 and jas 64-bit. Does it work?
It should
@@599CD Thank you 😇
ptrSafe also works with 32 bit ? because I ever get something error when I design on 64 bit then run it in 32 (somekind of down grade bit runs machine)
I have tried and looks it works for 32bit. thanks sir :D
Yep! :)
How do I do this when I only have a .mdb file and can’t do anything else then press okay when the message “This database was created with the 32 bit version. Please open it with the 32 bit version of MA”
I know you can go to the .mdb file and open it then SAVE AS the newer version accdb. BUT you would have to uninstall your 64 bit version and install the 32 bit version of Access (Office 365, etc) instead. They offer either version to download.
VERY GOOD
Hi! Richard I need your help here. My accdb is created with the 32-bit version of Microsoft Access. How to open this to 64-bit version of Microsoft access?
If the database doesn't open by itself then you'll have to create a new blank 64 bit database and then import all of the objects.
Where to find a reference of API libraries 32 bit to 64 bit?
There isn't really one reference. You just have to use the Google machine and hope someone else updated your favorite function.
Thanks a lot......
Everything on my 32 bit Databases work fine under 64-bit. Did you by chance do the same kind of video regarding Excel. All ... and I mean all my Excel forms I did in 32bit fail to execute for one reason or another.
Haven't done much with Excel in the past couple years.
@@599CD Thank you for the past videos. Discovered that Excel in 64 bit ditched the date picker. Bad Microsoft this project is moving to Access.
Thanks 🙏
Welcome
Honestly amazed that this issue has been around for 10-15 years and not a single tool or program to easily identify and update databases with compatibility issues. We've got tens of thousands of databases in our organization and there's no way we can dedicate the time and manpower needed to search through every line of code in thousands of databases hunting for potential compatibility issues that may arise if we upgrade to 64-bit. Would it truly be that difficult to create a tool to search through the files for the problematic Windows API calls and list off any files that have 32-bit ActiveX or COM Add-ins?
Yeah it's a big headache especially around the time when they were transitioning everything from 32 to 64 bit. I resisted it for the longest time because at first most people didn't need a 64 of it database but now since it's the standard and the default when people install it that's what everyone has.
Has anyone tried serial communication on 64 bit vba? I used to have SCOMMLib.scomm in a 32 bit excel vba on another device, but now on my 64 bit device i cant find anything about that library online. I've updated all the functions to include ptrsafe but now it cant find that library and I cant either
I hear you and am in the same boat. It is a pain to make sure all newer workstations have the 32 bit version of office installed. It is a big company with many lines of code (VBA) in each database.
thanks sir
Most welcome
Ugh so annoying. I have some files in the 64 bit and some in the 32 bit. How do you make all work?
You update everyone to 64 bit.
I am tiring to give my db to 32 bit computer users but I make it in the 64 bit computer
Gotta fix it
All of my 32 bit versions were screwed up in 64 bit version, because I heavily use vba! If micrisoft was smart enough to push everyone to convert 32 bit to 64 bit, it must create a converter...yes, converter to do this automatically. But microsoft care nothing about the developers! That's what monopolist is doing in the market.
Preach!
Why on Earth microsoft is doing this? Why to switch to 64 bit version when there are no obvious reasons to do so? Why not not leave us an option to choose from 32 or 64 bit versions. I prefer 32 bit version and all of my databases are 32! Give it to me in Office 2019! Do not push me into the craziness of converting my 100+ databases. I hate microsoft for enforcing people to 64 bit. It is not OK. And yes, there are conversion techniques, but I prefer stick to my 32 bit Access.
Yep... I agree that it was unnecessary for 99% of users... but I teach this stuff, so I have to stay with what's current and "default." I don't like it either, yet here we are.