Results 1 to 2 of 2

Thread: Displaying jpg's from a database path

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    Rancho Cucamonga
    Posts
    1

    Displaying jpg's from a database path

    Could someone please help ?
    I have a application that saves both text information and a digital photograph of the individual in a access database.
    The jpg is called via a path statement - c:\images\john.jpg.

    There is a need for a stand alone viewer that attaches to the access database (with search capabilities) and displays the image file along with the data.

    Any help, greatly appreciated.

  2. #2
    Fanatic Member
    Join Date
    Nov 2001
    Location
    Bangkok
    Posts
    969

    Hi

    I dont understand your question 100%

    If you want to view a pic via path it is of course the easiest way to have in the form a OLE-Object which get the pathlink to the pic. I use this system and it works perfect.

    TIP: Create a picture which just says that there doesnt exist a picture. If the filename exist but the picture got removed then this picture will be shown; If there is no picture the same.


    Example:

    Private Function showPictures()
    On Error GoTo ErrorHandler

    If Me.txtCustomerPicture = "" Then
    strFile = strAppPath & "\CustomerPictures\" & "noCustomerPicture.jpg"
    Me.txtCustomerPicture.Visible = False
    ElseIf Me.txtCustomerPicture = "noCustomerPicture.jpg" Then
    strFile = strAppPath & "\CustomerPictures\" & "noCustomerPicture.jpg"
    Me.txtCustomerPicture.Visible = False
    Else
    strFile = strAppPath & "\CustomerPictures\" & Me.txtCustomerPicture
    Me.txtCustomerPicture.Visible = True
    End If
    Me.oleCustomerPicture.CreateLink (strFile)

    exit function

    ErrorHandler:
    strFile = strAppPath & "\CustomerPictures\" & "noCustomerPicture.jpg"
    Me.txtCustomerPicture.Visible = True
    Me.oleCustomerPicture.CreateLink (strFile)

    end function


    This here works perfect in a programm from me. I use the Errorhandler to trap missing pictures.


    Franky
    Bangkok

Posting Permissions

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



Click Here to Expand Forum to Full Width