Results 1 to 3 of 3
  1. #1
    EddieN1 is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    May 2011
    Posts
    313

    Running Access as 32-bit program in 64-bit Office

    I have 64-bit Office installed on my Windows 10 64-bit system. This includes Access 2016, 64-bit. I need to examine a simple 32-bit database. When I click on a command button that calls VBA code, I get an error on the first Function it hits telling me I need to mark it with the ptrsafe attribute. Is there a way I can run the 64-bit Access in 32-bit mode? I have downloaded and installed the 32-bit version Microsoft Access database engine 2016 (English), but I don't know how to use it to open the 32-bit database. I don't need the 64-bit Access program so is there a way I can uninstall Access and the re-install the 32-bit version? (I want to leave my 64-bit versions of Office, Excel, Outlook, PowerPoint, etc.).

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    You cannot have a mixture of 32-bit and 64-bit Office programs. If you want to keep 64-bit Word etc, you will have to convert all API declarations to work in 64-bit Access.
    There's lots of guidance available online. For example, https://codekabinett.com/rdumps.php?...ion-vba-64-bit
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    No - you need to modify the code. As a minimum there are two things you need to to

    1. add ptrsafe to your api declarations
    2. change pointers (typically hwnd) from long to longptr

    This will then run in 32 or 64bit as .accdb

    If you are going to compile to .accde then better to put conditional code in - note you can only compile to the bit version of access. If you need both versions then you will need another machine with 32bit access.

    There are plenty of hits on the subject - here is an example https://access-programmers.co.uk/for...d.php?t=283116

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Running Access 2003 with Office 2016
    By NickMDal in forum Access
    Replies: 4
    Last Post: 12-28-2017, 08:56 PM
  2. Replies: 6
    Last Post: 11-21-2016, 05:02 AM
  3. Replies: 4
    Last Post: 08-19-2014, 12:20 PM
  4. Replies: 12
    Last Post: 10-03-2013, 12:32 PM
  5. Problem running Access 2000 database in Office 2007.
    By pmacafee in forum Programming
    Replies: 1
    Last Post: 07-13-2012, 11:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums