Results 1 to 4 of 4
  1. #1
    mfmalthaf is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    4

    Error 2013 Access

    Hi,



    I had created a MS access in 2003 version of office. After my lap top was updated to Office 2013, the command buttons of this MS access are not working.
    im getting a VBA error, saying "the code in this project must be updated for use on 64-bit..." (Please see the attchement)

    How to solve this error.
    Attached Thumbnails Attached Thumbnails Picture1.png  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    I had to retrofit my functions for some users who had 64 bit os.
    check to see if user is OS64, then apply PtrSafe to each function:

    Code:
    #If Win64 Then
        Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal lpszDir As String, ByVal FsShowCmd As Long) As Long
        Private Declare PtrSafe Function GetDesktopWindow Lib "user32" () As Long
    #Else
        Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal lpszDir As String, ByVal FsShowCmd As Long) As Long
        Private Declare Function GetDesktopWindow Lib "user32" () As Long
    #End If

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Another option may be to not install Office as 64bit and install office 32bit. IIRC the PtrSafe is only needed when running Access 64bit.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    I have Access 32 bit, run on 64bit OS and it runs without PtrSafe ,
    but 1 persons 64 PC would not use the functions until I did the PtrSafe .

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

Similar Threads

  1. Access 2013 sql error in desktop application
    By jassie in forum Programming
    Replies: 2
    Last Post: 06-10-2015, 01:20 PM
  2. Export From Access 2013 To Excel 2013
    By Esmatullaharifi in forum Programming
    Replies: 8
    Last Post: 04-17-2015, 09:40 PM
  3. Replies: 1
    Last Post: 01-13-2014, 08:48 AM
  4. Outlook 2013 + Access 2013 + HTML
    By Yann63 in forum Programming
    Replies: 2
    Last Post: 11-26-2013, 02:39 PM
  5. Replies: 4
    Last Post: 05-07-2013, 11:48 AM

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