Unanswered: Photo Link differs Windows Picture and Fax Viewer
I have an Access 2000 db that I am modifying to show pictures on a form of each item. There is a column in the table with the specific JPG file name for all of the photo files. All of the photos are stored in a subfolder called Photos from the same folder where the Db is kept. There is a default JPG file that contains a No Image on file message that is called NoPhoto.jpg.
This works on my PC (Windows 2000) but does not work on a coworkers PC with Windows XP. I am suspicious that it is related to the viewers. My default image viewer is MS-Photo Editor while his is Windows Picture and Fax Viewer. He gets the error message: dbname cannot open pathname filename.
Any suggestions would be welcome
My code is ...
In the Form_Load event it calls the following routine:
Dim strImagePath As String
Dim strMDBPath As String
Dim intSlashLoc As String
On Error GoTo ImagePathErr
'Obtain the full path of the current database or Access Project
strMDBPath = CurrentProject.FullName
'Find the location of the last backslash
intSlashLoc = InStrRev(strMDBPath, "\", Len(strMDBPath))
'Trim off the database name, leaving the database path
'and append the folder and the name of the image file
If (Len(Me.PhotoFile) <> 0) Then
strImagePath = Left(strMDBPath, intSlashLoc) & "Photos\" & Me.PhotoFile
strImagePath = Left(strMDBPath, intSlashLoc) & "Photos\" & "NoPhoto.JPG"
'Set ImageFrame to the path of the image file
Me.ImageFrame.Picture = strImagePath