|
-
Mar 2nd, 2002, 12:47 AM
#1
Thread Starter
New Member
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.
-
Mar 2nd, 2002, 11:40 AM
#2
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|