The code below in Access 2003 opens up a file broswer so that the path to images on a server can be inserted into a TextBox on a Form.
In trying to convert to Access 2010 64 BIT, I receive the error message to insert the ptrSafe command in the Declare statements to allow them to work under 64 Bit Access.
However, once I do that, clicking on the Command Button which triggers the code, results in no action.
Is there alternative code, for this simple function that will work in 64 Bit Access?
Code:
Dim strStartDir As String Dim strFilter As String Dim lngFlags As Long ' Start the file browser from the desired directory strStartDir = "F:\My Documents\DigitalImages" strStartDir = Left(strStartDir, Len(strStartDir) - Len(Dir(strStartDir))) strFilter = ahtAddFilterItem(strFilter, _ "Word Documents (*.doc)", "*.doc") strFilter = ahtAddFilterItem(strFilter, _ "Excel Files (*.xls)", "*.xls") strFilter = ahtAddFilterItem(strFilter, _ "All files (*.*)", "*.*") Me.ODPosteriorSegmentImagePath1TextBox = ahtCommonFileOpenSave(InitialDir:=strStartDir, _ Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, _ DialogTitle:="Select File") strPhotoPath = Nz(Me![ODPosteriorSegmentImagePath1TextBox], "") Me!ODPosteriorSegmentImageFrame1.ImageViewFile strPhotoPath