I have an Access database whereby the user selects a file of extension .gif or .jpg listed in an unbound control to be linked to a bound field of type OLE Object (Picture_Image). I am using the following code for the double-click event of the file list (The Picture_File_Name is a bound field which holds the relative path to where the .jpg or .gif file exists):
Private Sub lstFiles_DblClick(Cancel As Integer)
Dim strFileSelected As String
Dim strFilePath As String
strFileSelected = lstFiles.Value
Picture_File_Name.Value = strFileSelected
strFilePath = "C:\Documents and Settings\Dave Stolzenbach\My Documents\PBP Clients\Lawrence Technologies\catalog_pictu
res\" + strFileSelected
ed = 0
Picture_Image.SourceDoc = strFilePath
Picture_Image.SourceItem = ???
The examples for .SourceItem in Access help and MSDN Library use Excel which isn't helping me much. I need to know what value is expected for .SourceItem for .jpg and .gif files.
Any help on this is greatly appreciated.
Member of the
Golden Gate Better Business Bureau