Results 1 to 3 of 3
  1. #1
    Robert2150 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Location
    Sparks, Nv
    Posts
    102

    Using 32-Bit Database in 64-Bit Access Program

    I have an Access Database on a clients server that wascreated with 32 bit Access. The clientrecently upgraded their Microsoft Office Programs to 64 bit.I now get the following notices whenattempting to open the database.
    Compile error:
    The code in this project must be updated for use on 64-bit systems.
    Please review and update Declare statements and then mark them with
    the PtrSafe attribute.

    And it shows this code:
    Option Explicit
    Private Declare Functions GetSystemMenu Lib "User32" 9ByVal Hwnd As Long,_


    ByVal bRevert As Long) As Long
    Private Declare Function EnableMenuItem Lib "User32" (ByVal hMenu As_
    Long, ByVal wIDEnableItem As Long, ByVal vEnable As Long As Long
    Const NF_GRAYED = &h1&


    Does anyone have any suggestions to fix this problem?
    Thank you in advance, Bob W

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    try using the PTRSAFE keyword.

    Code:
    #if Win64 then
       Declare PtrSafe Function MyMathFunc Lib "User32" (ByVal N As LongLong) As LongLong
    #else
       Declare Function MyMathFunc Lib "User32" (ByVal N As Long) As Long
    #end if

  3. #3
    Robert2150 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Location
    Sparks, Nv
    Posts
    102
    ranman256,

    Thanks I will try it, and let you know.

    Robert2150

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

Similar Threads

  1. Replies: 5
    Last Post: 02-10-2017, 09:15 AM
  2. Replies: 1
    Last Post: 11-28-2015, 07:54 AM
  3. Replies: 4
    Last Post: 09-14-2015, 12:33 PM
  4. Replies: 1
    Last Post: 04-05-2013, 09:48 AM
  5. C program: read/write Access database
    By serendipity1276 in forum Programming
    Replies: 1
    Last Post: 08-15-2011, 01:15 PM

Tags for this Thread

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