Can't recall Photo after generating report

  • Thread starter Thread starter charles.kendricks
  • Start date Start date
C

charles.kendricks

I have a form used for patients that includes the client picture. The
photos are called from a respository folder by the On_Current event. I
also have buttons which generate reports from the same form. The
problem is that once the report is closed the form no longer displays
the photo. The following is the code used in the On_Current even of
the form:

Dim strFile As String
Dim strDefFile As String
Dim strFullPath As String
Dim strDefFullPath As String

' Be sure to amend photo path and image control

strFullPath = strPhotodir + Me!SSN + ".bmp"
strDefFullPath = strPhotodir + "Bitmaps\Med5.gif"
strFile = Dir(strFullPath, vbNormal)
strDefFile = Dir(strDefFullPath, vbNormal)
Debug.Print

If (strFile <> vbNullString) Then
Image147.Picture = strFullPath
Else
Image147.Picture = strDefFullPath
End If
 
Back
Top