Add Photo To Form Stored on Network

mous

Registered User.
Local time
Today, 01:24
Joined
Sep 26, 2001
Messages
109
Hello

I would like to add a photo to a form that is bound to a staff record within a table. Photos are stored on a network.

I've tried everything but it still does not work. I've even followed procedures already posted but still does not work.

Can someone please tell me how I do this. It's driving me mad.

Thanks
Dawn
 
Function GetPic(MyID As String)
'Display an image on a form or report relating to the ID No (PK)
'Image file name MUST be the same as UniqueID in table

'OnCurrent of form or OnFormat of Detail on report put..

MyPic.Picture = ""
MyPic.Picture = GetPic(MyID)

'Where MyPic is the name of the image and MyID is the name of the unique field

On Error Resume Next

Dim mypath As String
Dim MyFile As String

mypath = "C:\Pics" ' Path where pictures are stored
MyFile = MyID & ".JPG" 'Change file extn to those of stored images
GetPic = mypath & MyFile 'Full path of pic including file name
End Function

NOTE: Will not work on continuous forms.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom