Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Location
    Princeton, NJ USA
    Posts
    13

    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:
    Function SetImagePath()
    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
    Else
    strImagePath = Left(strMDBPath, intSlashLoc) & "Photos\" & "NoPhoto.JPG"
    End If

    'Set ImageFrame to the path of the image file
    Me.ImageFrame.Picture = strImagePath
    Exit Function
    ImagePathErr:
    MsgBox Err.Description
    End Function

  2. #2
    Join Date
    Oct 2003
    Posts
    6

    MS XP Uses Different Photo Viewer/Editor

    Try the attached from www.lebans.com. Incorporate it into your front end db and it should take care of your problem.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •