C
Cioffredi
I am pulling multiple jpg images into a report using a Detail Format event
procedure. This works fine but takes forever. Watching the progress window
shows that it imports each picture multiple times upon opening the report as
well as each time I page forward or back in the report. If anyone knows of a
better method or solution, I am all ears. Running Access 2003, VBA code is
below. imgPicture1 is the control name.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Path_Name As String
Path_Name = "P:\PR40362\Database Photos\"
On Error Resume Next
imgPicture1.Visible = True
imgPicture1.Picture = [Path_Name] & [Field_Photo_Name] & ".jpg"
'Error message to display if photo not defined
If Err = 2220 Then
imgPicture1.Visible = False
End If
End Sub
procedure. This works fine but takes forever. Watching the progress window
shows that it imports each picture multiple times upon opening the report as
well as each time I page forward or back in the report. If anyone knows of a
better method or solution, I am all ears. Running Access 2003, VBA code is
below. imgPicture1 is the control name.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Path_Name As String
Path_Name = "P:\PR40362\Database Photos\"
On Error Resume Next
imgPicture1.Visible = True
imgPicture1.Picture = [Path_Name] & [Field_Photo_Name] & ".jpg"
'Error message to display if photo not defined
If Err = 2220 Then
imgPicture1.Visible = False
End If
End Sub