Hello Guys,
I have a Photo Summary report with 10 photos. Each image's data source is an invisible field with the photo path in another folder.
Everything worked fine until yesterday. I noticed some of the images show sometimes and other times when I run the report it's not there.
Here is the Code I have for each
Private Sub cmdAddPhoto1_Click()
Dim objPhoto As Object
Dim strfile As String
Dim strfolder As String
Dim varItem As Variant
Set objPhoto = Application.FileDialog(3)
objPhoto.allowMultiSelect = True
If objPhoto.Show Then
For Each varItem In objPhoto.SelectedItems
strfile = Dir(varItem)
strfolder = Left(varItem, Len(varItem) - Len(strfile))
MsgBox "Folder" & strfolder & vbCrLf & "File: " & strfile
PhotoSource1 = strfolder + strfile
Next
End If
Me.Refresh
Set objPhoto = Nothing
End Sub
Any idea what my problem is?
Thank you
I have a Photo Summary report with 10 photos. Each image's data source is an invisible field with the photo path in another folder.
Everything worked fine until yesterday. I noticed some of the images show sometimes and other times when I run the report it's not there.
Here is the Code I have for each
Private Sub cmdAddPhoto1_Click()
Dim objPhoto As Object
Dim strfile As String
Dim strfolder As String
Dim varItem As Variant
Set objPhoto = Application.FileDialog(3)
objPhoto.allowMultiSelect = True
If objPhoto.Show Then
For Each varItem In objPhoto.SelectedItems
strfile = Dir(varItem)
strfolder = Left(varItem, Len(varItem) - Len(strfile))
MsgBox "Folder" & strfolder & vbCrLf & "File: " & strfile
PhotoSource1 = strfolder + strfile
Next
End If
Me.Refresh
Set objPhoto = Nothing
End Sub
Any idea what my problem is?
Thank you