X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Access 64 Bit Install Convert Back To 32 Bit, Access 2016    
post May 21 2019, 09:27 PM

Posts: 98
Joined: 3-February 03

I installed Office 365 2016 assuming that it would default to 32 bit as before. Unfortunately, the new default install is 64 bit which blocks parts of my 32 bit vba code.
I have 2 questions:

1) Do I need to uninstall/reinstall, or is there some shortcut to convert from 64 bit back to 32 bit?
2) Is there a way to keep the 64 bit installation and add a separate 32 bit Access only on the same machine?

Go to the top of the page
post May 21 2019, 09:53 PM

Access Wiki and Forums Moderator
Posts: 75,527
Joined: 19-June 07
From: SunnySandyEggo

Hi Sup,
1. Most likely uninstall first
2. Probably not
3. You can fix your code to work on 64-bit

Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
post May 22 2019, 03:04 AM

Posts: 8
Joined: 22-May 19

Just to give an example of what you may have to do: most likely it is about adding PtrSafe to your declarations. To make it work on both 32 bit and 64 bit installations of office you can do the following:

#If Win64 Then
Private Declare PtrSafe Function apiGetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
#End If

Exactly the same, just the PtrSafe needs to be added for 64 bit.

For some functions where you get a Long from a library you may need to replace by a LongPtr datatype for 64 bit installations as well.
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    18th June 2019 - 05:51 PM