Results 1 to 4 of 4
  1. #1
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245

    Compile error, code must be updated for use on 64-bit system

    Hey, I have put my DB my shared network, and everyone was able to connect there front end to the back end easily. My issue is the i recieved this error on one of the pcs:

    Compile Error:

    The code in this project must be updated for use on 64-bit systems.
    please review and update Declre statements and then marke them with the ptrSafe attribute.




    it is new and the store put everything on thepc for us. I have found a microsoft link, http://support.microsoft.com/kb/983043 but i am still have this error after implementing this procedure.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you used the If...Else for each of your Declare values?
    http://msdn.microsoft.com/en-us/libr.../gg278832.aspx

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I ran into this error trying to run db on Windows 7 64-bit machine because of this code in module header:

    'API function to disable the X Close button is for 32-bit machine
    Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal wRevert As Long) As Long
    Private Declare Function EnableMenuItem Lib "user32" (ByVal hMenu As Long, ByVal wIDEnableItem As Long, ByVal wEnable As Long) As Long

    The PtrSafe keyword works when running db on the Windows7 64-bit but on WindowsXP 32-bit it won't compile so I am not sure what that MSKB article was trying to instruct. If it won't compile how can it be backwards compatible? If Vba7 is supposed to be intrinsic constant, it doesn't return a value, nor does Vba6.

    The VBA editor version can be found by: Application.VBE.Version

    I also had a variable declared as integer to hold RecordCount of a recordset but had to change to long or double (forget which worked, didn't save).
    Last edited by June7; 05-09-2013 at 11:20 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    ok, thanks, ill give it a shot!

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

Similar Threads

  1. Replies: 7
    Last Post: 06-08-2012, 09:55 PM
  2. Compile Error: Can't find out what's wrong with the code.
    By vickan240sx in forum Programming
    Replies: 4
    Last Post: 05-24-2012, 06:25 PM
  3. Replies: 5
    Last Post: 10-25-2011, 08:01 AM
  4. Compile error: code or function not defined
    By GeorgeBrown in forum Access
    Replies: 1
    Last Post: 09-19-2011, 10:25 AM
  5. Replies: 23
    Last Post: 03-26-2009, 06:50 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