Results 1 to 13 of 13
  1. #1
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167

    32 bit to 64 bit conversion

    HI i have an accdb file (with no backend tables) that i created with MSAccess 32 bit .
    A customer has MSAccess 64 bit on his computer and can't open the file.

    Is there a way to get his computer to read my 32 bit version or is there a way to make him a 64bit copy (from my 32bit computer)?

    How do others distribute accdb / accde files in both formats when you can only have one format (32 bit in my case) installed on a computer?



    thanks in advance,

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Convert all API ffunctions to PTRSAFE.

    Code:
    #if win64 then
      'use PTRSAFE fnctn.
    #else
       'Normal fnctn
    #end if

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Also, if you're creating an accde, it must be created with the same bitness. I have a separate VM with 64bit Access.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167
    Quote Originally Posted by ranman256 View Post
    Convert all API ffunctions to PTRSAFE.

    Code:
    #if win64 then
      'use PTRSAFE fnctn.
    #else
       'Normal fnctn
    #end if

    Thanks for the help but this is over my head. can you tell me (exactly) what to do with this code please?

    regards,

  5. #5
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167
    Thanks pbaldy, sorry but again this is over my head.
    i do intend on given them a accde version - what do i do to make this work properly?

    regards,

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by fishhead View Post
    Thanks pbaldy, sorry but again this is over my head.
    i do intend on given them a accde version - what do i do to make this work properly?
    A computer with 64bit Access can only run an accde created by a computer with 64bit Access. More here:

    https://www.devhut.net/2017/04/13/ac...compatibility/

    I'm curious about ranman's use of conditional compilation. It is also shown in the link above, but I've had success with simply adding PtrSafe to API's, like:

    Private Declare PtrSafe Function...

    and had it run/compile in both 32 and 64 bit. Maybe I've just gotten lucky.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    In answer to the previous point about conditional compilation, there are almost no occasions when using #If Win64 is required
    A better alternative is:

    Code:
    #If VBA7 Then 
    'for use with A2010 or later whether 32-bit or 64-bit
    'use PtrSafe with all declarations and LongPtr for pointers/handles such as hwnd
    #Else
    'for use with A2007 or earlier
    'normal API declarations with no PtrSafe or LongPtr
    #End if
    I disagree with Daniel Pineault.
    There is absolutely no need to use #If VBA7 And Win64 Then ...

    However if all users are running A2010 or later, they will have VBA7 so the conditional compilation is superfluous.
    Just use the modified APIs with PtrSafe and LongPtr (where necessary)

    Hope that helps

  8. #8
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167
    sorry guys you're talking over my head...

    from what i understand if the program is created with Access 32 bit you can not run it on a machine running access 64 bit? this begs the questions how can i create an .accde file from a computer that has Windows 10 - 64 bit and MSAccess 32bit installed that i can distribute to my customers whom may have either 32 or 64 bit installed on their computers? How are developers handling this?

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by fishhead View Post
    How are developers handling this?
    I already mentioned I use a VM with 64bit Access to create a 64bit accde, having already used my main computer with 32bit Access to create a 32bit accde. You can't provide a single accde that can be used by either bitness.

    Colin, that explains why I didn't need to use conditional compilation. I'm guessing Daniel was providing a solution that would work regardless of version.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    @fishhead
    My reply was primarily intended for @Pbaldy
    In answer to your question, to create the two bitnesses of ACCDE, I have a laptop with 64-bit Access and a desktop with 32-bit.
    Whether you use different workstations or a VM, there is no way of circumventing the need for two versions if you intend to distribute apps as ACCDEs.

    Paul
    Several years ago I used both #If VBA7 and #ElseIf Win64 constructs as I wrongly believed both to be necessary.
    In reality, the Win64 section was never used!
    However it took me a long time to realise that and I still see many experienced developers advocating its use unnecessarily.

    I still have a few clients running A2007 so I still use the simpler form of conditional compilation for their benefit. Hopefully not needed for much longer.
    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

  11. #11
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167
    Quote Originally Posted by isladogs View Post
    @fishhead
    My reply was primarily intended for @Pbaldy
    In answer to your question, to create the two bitnesses of ACCDE, I have a laptop with 64-bit Access and a desktop with 32-bit.
    Whether you use different workstations or a VM, there is no way of circumventing the need for two versions if you intend to distribute apps as ACCDEs.

    Paul
    Several years ago I used both #If VBA7 and #ElseIf Win64 constructs as I wrongly believed both to be necessary.
    In reality, the Win64 section was never used!
    However it took me a long time to realise that and I still see many experienced developers advocating its use unnecessarily.

    I still have a few clients running A2007 so I still use the simpler form of conditional compilation for their benefit. Hopefully not needed for much longer.

    ok thanks for the clarification. Before i invest in the cost of the 2nd version of MSAccess and find a computer to install it on - is there any other solution that can be used address this problem? Any other format i can save the file in for instance? Is every programmer that is distributing apps to 32 & 64 bit computer end users actually programming on 2 computers (one for each)? I didn't realize this was happening?

    Would i still have this problem if i gave the enduser the accdb version?

  12. #12
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    There are a few other considerations such as certain references and some ActiveX controls only working in 32-bit.
    However in general, ACCDB files will work in both bitnesses providing you manage API declarations as described above.
    That means you can develop in whichever bitness you prefer though it is always advisable to test it works in the other bitness
    Distributing ACCDB files is therefore easier but your code won't be secure and it is more difficult to prevent end users modifying your app.

    Distributing ACCDE files is more secure as the code is compiled but you have to deal with the bitness issue as described earlier in the thread
    If your workstation has 64-bit Windows, you can install 64-bit Access on a virtual machine as Paul mentioned earlier..
    Remember that most licences will allow at least two installations of Office
    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

  13. #13
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167
    Ok thanks Colin

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

Similar Threads

  1. Conversion Query?
    By natonstan in forum Queries
    Replies: 1
    Last Post: 09-11-2015, 03:44 PM
  2. PDF to JPG conversion
    By max_the_axe in forum Access
    Replies: 6
    Last Post: 09-01-2014, 11:33 AM
  3. MDE TO MDB conversion
    By cooglerj in forum Import/Export Data
    Replies: 2
    Last Post: 05-05-2014, 10:58 AM
  4. Weeks Conversion
    By jake32008 in forum Access
    Replies: 3
    Last Post: 10-26-2012, 01:28 PM
  5. UM Conversion
    By Rawb in forum Database Design
    Replies: 5
    Last Post: 01-24-2011, 04:02 PM

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