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.

Комментарии • 50

  • @janicemonroe6870
    @janicemonroe6870 2 года назад +2

    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.

    • @599CD
      @599CD  2 года назад +1

      Love you, too. :)

    • @linawalker869
      @linawalker869 2 года назад

      Hi Janice, were you able to open your old database at all? I can't even open mine.

    • @amelya_618
      @amelya_618 Год назад

      Thats what exactly happen to me.

  • @dankirchner4460
    @dankirchner4460 2 года назад

    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.

    • @599CD
      @599CD  2 года назад +1

      You're very welcome. Thanks for sharing your story.

  • @TheMiig1513
    @TheMiig1513 Год назад

    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

    • @599CD
      @599CD  Год назад

      Type Mismatch: 599cd.com/TypeMismatch

  • @jasons9875
    @jasons9875 2 года назад

    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.

    • @599CD
      @599CD  2 года назад +1

      I can't see why an SQL statement would cause that problem. I'd need to see your code to tell you for sure.

  • @linawalker869
    @linawalker869 2 года назад

    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

    • @599CD
      @599CD  2 года назад

      You should all have the same version of Office. Uninstall any 32-bit users and reinstall 64-bit.

  • @minarendra
    @minarendra 2 года назад

    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 ?

    • @599CD
      @599CD  2 года назад +2

      It should work fine unless the developer used 64-bit specific code or data types, which is unlikely. Try it and see. :)

  • @aravind3596
    @aravind3596 9 дней назад

    Thanks 👍

  • @printerscld4114
    @printerscld4114 2 года назад

    How about codes without declare, such as public function? Should I also update it to public declare ptrsafe function?

    • @599CD
      @599CD  2 года назад

      Sure

  • @rhodnill5906
    @rhodnill5906 2 года назад +1

    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?

    • @599CD
      @599CD  2 года назад +3

      It should

    • @rhodnill5906
      @rhodnill5906 2 года назад

      @@599CD Thank you 😇

  • @ristantosky
    @ristantosky 3 года назад +1

    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)

    • @ristantosky
      @ristantosky 3 года назад

      I have tried and looks it works for 32bit. thanks sir :D

    • @599CD
      @599CD  3 года назад +1

      Yep! :)

  • @Ahl3rt
    @Ahl3rt 5 месяцев назад

    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”

    • @pjpdjs
      @pjpdjs 3 месяца назад

      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.

  • @frombasrah7729
    @frombasrah7729 Год назад

    VERY GOOD

  • @amelya_618
    @amelya_618 Год назад

    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?

    • @599CD
      @599CD  Год назад +1

      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.

  • @Rona_Rose
    @Rona_Rose 2 года назад

    Where to find a reference of API libraries 32 bit to 64 bit?

    • @599CD
      @599CD  2 года назад

      There isn't really one reference. You just have to use the Google machine and hope someone else updated your favorite function.

  • @CSWithShafiqueSir
    @CSWithShafiqueSir 18 дней назад

    Thanks a lot......

  • @gonefishing2006
    @gonefishing2006 2 года назад

    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.

    • @599CD
      @599CD  2 года назад

      Haven't done much with Excel in the past couple years.

    • @gonefishing2006
      @gonefishing2006 2 года назад +1

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

  • @mrvictor2010
    @mrvictor2010 2 года назад

    Thanks 🙏

    • @599CD
      @599CD  2 года назад

      Welcome

  • @bleach219
    @bleach219 10 месяцев назад +1

    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?

    • @599CD
      @599CD  10 месяцев назад +1

      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.

    • @reallywhoaskedtho
      @reallywhoaskedtho 8 месяцев назад

      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

    • @pjpdjs
      @pjpdjs 3 месяца назад

      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.

  • @maheshkumarnaik754
    @maheshkumarnaik754 7 месяцев назад

    thanks sir

    • @599CD
      @599CD  7 месяцев назад

      Most welcome

  • @jfresh2054
    @jfresh2054 Год назад

    Ugh so annoying. I have some files in the 64 bit and some in the 32 bit. How do you make all work?

    • @599CD
      @599CD  Год назад

      You update everyone to 64 bit.

  • @6esrprojects926
    @6esrprojects926 2 года назад

    I am tiring to give my db to 32 bit computer users but I make it in the 64 bit computer

    • @599CD
      @599CD  2 года назад

      Gotta fix it

  • @Rona_Rose
    @Rona_Rose 2 года назад

    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.

    • @599CD
      @599CD  2 года назад

      Preach!

  • @Rona_Rose
    @Rona_Rose 2 года назад

    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.

    • @599CD
      @599CD  2 года назад +1

      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.