DJK (John) Robinson
djkr at msn.com
Sat Jun 9 07:13:32 CDT 2012
Rocky I'm sure your analysis is correct - he's running 64-bit Office2010. I've avoided it like the plague so can't guarantee it. But there's a couple of MSDN articles in this area: http://msdn.microsoft.com/en-us/library/ee691831.aspx and http://msdn.microsoft.com/en-us/library/gg278832.aspx HTH John -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin at bchacc.com Sent: 09 June 2012 13:02 To: Access Developers discussion and problem solving Subject: Re: [AccessD] New Computer Gives Error forgot to send plain text. R -------- Original Message -------- Subject: RE: [AccessD] New Computer Gives Error From: <rockysmolin at bchacc.com> Date: Sat, June 09, 2012 5:01 am To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Further here are the Declares in the app - most are from the ADH 2003. Adding PtrSafe creates a compile error - So I'm thinking that's an Access 2010 reserved word. Declare Function adh_apiGetOpenFileName Lib "comdlg32.dll" _ Alias "GetOpenFileNameA" (ofn As tagOPENFILENAME) As Boolean Declare Function adh_apiGetSaveFileName Lib "comdlg32.dll" _ Alias "GetSaveFileNameA" (ofn As tagOPENFILENAME) As Boolean Declare Function ShellExecute Lib "shell32.dll" Alias _ "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation _ As String, ByVal lpFile As String, ByVal lpParameters _ As String, ByVal lpDirectory As String, ByVal nShowCmd _ As Long) As Long Private Declare Function ts_apiGetOpenFileName Lib "comdlg32.dll" _ Alias "GetOpenFileNameA" (tsFN As tsFileName) As Boolean Private Declare Function ts_apiGetSaveFileName Lib "comdlg32.dll" _ Alias "GetSaveFileNameA" (tsFN As tsFileName) As Boolean Private Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long Private Declare Function SHGetPathFromIDList Lib "shell32.dll" _ Alias "SHGetPathFromIDListA" (ByVal pidl As Long, _ ByVal pszPath As String) As Long Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" _ (ByVal hwndOwner As Long, ByVal nFolder As Long, _ pidl As ITEMIDLIST) As Long Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _ "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long Declare Function adh_apiDeleteDC Lib "gdi32" _ Alias "DeleteDC" (ByVal hdc As Long) As Long Declare Function adh_apiGetDeviceCaps Lib "gdi32" _ Alias "GetDeviceCaps" (ByVal hdc As Long, _ ByVal nIndex As Long) As Long Declare Function adh_apiGetClientRect Lib "USER32" _ Alias "GetClientRect" (ByVal hWnd As Long, _ lpRect As adhTypeRect) As Long Declare Function adh_apiIsIconic Lib "USER32" _ Alias "IsIconic" (ByVal hWnd As Long) As Long Declare Function adh_apiMoveWindow Lib "USER32" _ Alias "MoveWindow" (ByVal hWnd As Long, _ ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, _ ByVal nHeight As Long, ByVal bRepaint As Long) As Long Declare Function adh_apiGetSystemMetrics Lib "USER32" _ Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long Declare Function adh_apiCreateIC Lib "gdi32" _ Alias "CreateICA" (ByVal lpDriverName As String, _ ByVal lpDeviceName As String, ByVal lpOutput As String, _ lpInitData As Any) As Long Declare Function adh_apiGetWindowRect Lib "USER32" _ Alias "GetWindowRect" (ByVal hWnd As Long, _ lpRect As adhTypeRect) As Long Declare Function adh_apiGetParent Lib "USER32" _ Alias "GetParent" (ByVal hWnd As Long) As Long Declare Function adh_apiGetOpenFileName Lib "comdlg32.dll" _ Alias "GetOpenFileNameA" (ofn As tagOPENFILENAME) As Boolean Declare Function adh_apiGetSaveFileName Lib "comdlg32.dll" _ Alias "GetSaveFileNameA" (ofn As tagOPENFILENAME) As Boolean Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long Declare Function adhChooseCOlor Lib "msaccess.exe" _ Alias "#53" (ByVal hWnd As Long, RGB As Long) As Long Private Declare Function apiMessageBoxW Lib "user32.dll" Alias "MessageBoxW" _ (ByVal hWnd As Long, ByVal Txt As String, _ ByVal Caption As String, ByVal Typ As Integer) As Integer -------- Original Message -------- Subject: [AccessD] New Computer Gives Error From: <rockysmolin at bchacc.com> Date: Sat, June 09, 2012 4:42 am To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Dear List: I am out of town until the 17th so figuring out what's wrong with an app that has been running fine and now doesn't is awkward. The user got a new computer with (I think) W7 and new Office (but he doesn't know which version) and sent me the screen shot he gets when he tries to open the app. The error reads:"The expression you entered as the event property setting produced the following error code: 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." Is he running the 64-bit Office and needs to load 32-bit version instead? MTIA, Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com