D
develguy
I need to have an external (linked) image on a report. I have
attempted to use the same code I use in the same DB's forms. The code
on the form(s) is called from OnCurrent and works flawlessly.
I am able to see the images on the report but not before I have to
click through the 2100 error. The code works the same from the header
group and the details section "On Format" sub.
Does anyone know how to bypass/ignore this error or apply my code
correctly?
Here's the code I am using along w/ Lebans:
http://www.lebans.com/loadjpeggif.htm
=====================================================
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Err.Number = 2100 Then
MsgBox "error"
Exit Sub
End If
On Error GoTo Eignore
Dim sPath As String
If IsNull(PicFileName) Or PicFileName = "" Then
If Len(Dir(Me![PicPath])) > 0 Then
sPath = PicPath
fLoadPicture Me.Image1, sPath, True
Else
'MsgBox "missing image"
sPath = txtPath & "NoImageOnFile.jpg"
fLoadPicture Me.Image1, sPath, True
End If
End If
ScrollToHome Me.Image1
Eignore:
If Err.Number = 2100 Then
MsgBox "error"
Resume
End If
End Sub
=========================================================
Thanks!
Bob
attempted to use the same code I use in the same DB's forms. The code
on the form(s) is called from OnCurrent and works flawlessly.
I am able to see the images on the report but not before I have to
click through the 2100 error. The code works the same from the header
group and the details section "On Format" sub.
Does anyone know how to bypass/ignore this error or apply my code
correctly?
Here's the code I am using along w/ Lebans:
http://www.lebans.com/loadjpeggif.htm
=====================================================
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Err.Number = 2100 Then
MsgBox "error"
Exit Sub
End If
On Error GoTo Eignore
Dim sPath As String
If IsNull(PicFileName) Or PicFileName = "" Then
If Len(Dir(Me![PicPath])) > 0 Then
sPath = PicPath
fLoadPicture Me.Image1, sPath, True
Else
'MsgBox "missing image"
sPath = txtPath & "NoImageOnFile.jpg"
fLoadPicture Me.Image1, sPath, True
End If
End If
ScrollToHome Me.Image1
Eignore:
If Err.Number = 2100 Then
MsgBox "error"
Resume
End If
End Sub
=========================================================
Thanks!
Bob