P
paul bennett
I have a large number of photos linked to display in a report and a form.
This is set up so that the image frame will look for the appropriate file
without incorporating it as an OLE object:
'define the photo file name'
Dim thePhotoPath1 As String
thePhotoPath1 = theDbFolder & "GazetteerMaps\" & theSite & ".jpg"
Dim thePhotoPath2 As String
thePhotoPath2 = theDbFolder & "GazetteerPhotos\" & theSite & ".jpg"
'set each image frame to contain a photo
Me.ImgPhoto1.Picture = thePhotoPath1
Me.ImgPhoto2.Picture = thePhotoPath2
Presently, there needs to be a file for every site, or I get an error
message to debug. Is there some code that will tell the image frame
(ImgPhoto1 and 2) to display a default image or to simply not display in the
event of a photo not being present?
This is set up so that the image frame will look for the appropriate file
without incorporating it as an OLE object:
'define the photo file name'
Dim thePhotoPath1 As String
thePhotoPath1 = theDbFolder & "GazetteerMaps\" & theSite & ".jpg"
Dim thePhotoPath2 As String
thePhotoPath2 = theDbFolder & "GazetteerPhotos\" & theSite & ".jpg"
'set each image frame to contain a photo
Me.ImgPhoto1.Picture = thePhotoPath1
Me.ImgPhoto2.Picture = thePhotoPath2
Presently, there needs to be a file for every site, or I get an error
message to debug. Is there some code that will tell the image frame
(ImgPhoto1 and 2) to display a default image or to simply not display in the
event of a photo not being present?