How do I get a system I developed with 32-bit Access to run with people running 64-bit Access

I've created a data reporting system using 32-bit Access with Basic background code  but it will run on a machine running 64-bit Access.
rwoosleyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
A 32-bit Access app should run in 64-bit Access, so long as you're not using 32-bit controls/apis or such.

You can't compile 32-bit Access apps to .mde/.accde and run them on 64-bit Access, however. You'd have to create two distinct versions - one for 32-bit, and another for 64-bit.
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
If you have used any API calls, then you'll need two versions or use compiler directives.   Also as Scott mentioned, controls and references all need to be 64 bit if your using 64 bit.

BTW, here is some helpful info if you did use any API calls:

This will help you determine what might need to be changed:

Microsoft Office Code Compatibility Inspector user's guide
http://technet.microsoft.com/en-us/library/ee833946.aspx

also read:

 Compatibility Between the 32-bit and 64-bit Versions of Office 2010
http://msdn.microsoft.com/en-us/library/ee691831(office.14).aspx

and the section "Introducing the VBA 7 Code Base" for the general overview.

All the new 64 bit calls are here:
http://www.microsoft.com/download/en/confirmation.aspx?displaylang=en&id=9970

a list of all the calls that were modified for 64 bit:
http://msdn.microsoft.com/en-us/library/aa383663(VS.85).aspx

Jim.
0
rwoosleyAuthor Commented:
Got it.  I'll take a look at the Inspector.  I also found your response to the same problem back in March of 2010.  I'll check out both and get back  Thanks!!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

PatHartmanCommented:
If you have any influence regarding versions, get your client to stick with the 32-bit version of Office UNLESS they have an absolute need to support humongous spreadsheets.  There is absolutely no other reason to switch and several reasons to not switch including the loss of any 32-bit add ins your Office apps might be using as well as the code change to account for changing any API calls that use pointer variables.

As Scott said, if you have to support both environments and you must deliver a compiled app, then you must maintain two separate development environments since you can run compiled databases in the other bit-version.
The first part of the code below is copied from a web entry - the link is at the end.  It explains generally what you need to do.  The second part is the implementation of the API call that I used.  You will need to locate the specific instructions for the API call you are using in order to find out what arguments need changing.

''''''''Conditional compiling
''''''''
''''''''If your code needs to run on both 32 bit and 64 bit Excel, then another thing to do is add conditional compilation to your VBA.
''''''''
''''''''Microsoft devised two compile constants to handle this:
''''''''
''''''''VBA7: True if you're using Office 2010, False for older versions
''''''''
''''''''WIN64: True if your Office installation is 64 bit, false for 32 bit.
''''''''
''''''''Since the 64 bit declarations also work on 32 bit Office 2010, all you have to test for is VBA7:
''''''''
''''''''#If VBA7 Then
''''''''     Private Declare PtrSafe Function GetDeviceCaps Lib "gdi32" (ByVal hDC As LongPtr, ByVal nIndex As Long) As Long
'''''''' #Else
''''''''     Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal nIndex As Long) As Long
'''''''' #End If
''''''''
''''''''
''''''''And then in the routine where this function is put to use:
''''''''
''''''''#If VBA7 Then
''''''''     Dim hDC As LongPtr
'''''''' #Else
''''''''     Dim hDC As Long
'''''''' #End If
''''''''Dim lDotsPerInch As Long
'''''''''Get the user's DPI setting
'''''''' lDotsPerInch = GetDeviceCaps(hDC, LOGPIXELSX)

'''''''''''''''''''''''''''''''''''''''''''''
'''
''' http://www.jkp-ads.com/articles/apideclarations.asp
'''
''''''''''''''''''''''''''''''''''''''''''''''''
#If VBA7 Then
     Public Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" Alias _
             "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
        
     Public Type OPENFILENAME
         lStructSize As Long
         hwndOwner As LongPtr
         hInstance As LongPtr
         lpstrFilter As String
         lpstrCustomFilter As String
         nMaxCustFilter As Long
         nFilterIndex  As Long
         lpstrFile As String
         nMaxFile As Long
         lpstrFileTitle As String
         nMaxFileTitle  As Long
         lpstrInitialDir As String
         lpstrTitle As String
         flags As Long
         nFileOffset As Integer
         nFileExtension As Integer
         lpstrDefExt As String
         lCustData As Long
         lpfnHook As LongPtr
         lpTemplateName As String
     End Type
    
 #Else

     Public Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
             "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
        
     Public Type OPENFILENAME
         lStructSize As Long
         hwndOwner As Long
         hInstance As Long
         lpstrFilter As String
         lpstrCustomFilter As String
         nMaxCustFilter As Long
         nFilterIndex  As Long
         lpstrFile As String
         nMaxFile As Long
         lpstrFileTitle As String
         nMaxFileTitle  As Long
         lpstrInitialDir As String
         lpstrTitle As String
         flags As Long
         nFileOffset As Integer
         nFileExtension As Integer
         lpstrDefExt As String
         lCustData As Long
         lpfnHook As Long
         lpTemplateName As String
     End Type
 #End If

Open in new window

0
rwoosleyAuthor Commented:
Got it, again.  Good to know.  It actually is not the client but a colleague on the ground that inadvertently (how I don't know) was issued a laptop configured to run 64 rather than 32-bit.  

The part about the 2 development environments rings especially true.  I will make the case to avoid this in the future using your strong arguments!  

Thanks again.
0
PatHartmanCommented:
The install CD (or download in the case of O365) includes both versions and the license is good for both.  So, your colleague can uninstall the 64-bit and install the 32-bit version of Office and still use the same license.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwoosleyAuthor Commented:
Sorry it took so long to get back to this.  I ended up having to give the uncompiled 32-bit Access 2000 version database to another colleague of mine to modify and (I'm assuming) test in his 62-bit Access environment.  In any event, his modifications worked.  He essentially removed all the background Access DECLARE statements and reworked a module that referenced them.  I haven't had a chance to do a one-to-one comparison of the code but his mods worked.  I tried using the Compatibility Inspector to no avail unfortunately.  Thanks for the effort just the same.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.