C
CCross
I have the following code in a report. The code and image work fine until I
try to add fields from another table to the report. After adding the extra
fields I recieve an error of Run-time error '13' Type mismatch with the first
line of code after the ELSE highlighted. When troubleshooting I also get a
message of Cannot jump to 'ImagePath' because it is in the library
'C:\Drawing Shared\DCR DATABASE\DCR DATABASE.mdb' which is not currently
referenced. The path that is mentioned is where my images are stored.
FYI--ImagePath is a field that holds the path of my image and ImageFrame is
the image control.
I am relatively new at code and would appreciate any help to resolve this
issue.
Thanks
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If IsNull(Me.ImagePath) Then
Me.ImageFrame.Visible = False
errormsg.Caption = "Image Not Found"
errormsg.Visible = True
Else
Me.ImageFrame.Picture = Me.ImagePath
Me.ImageFrame.Visible = True
End If
End Sub
try to add fields from another table to the report. After adding the extra
fields I recieve an error of Run-time error '13' Type mismatch with the first
line of code after the ELSE highlighted. When troubleshooting I also get a
message of Cannot jump to 'ImagePath' because it is in the library
'C:\Drawing Shared\DCR DATABASE\DCR DATABASE.mdb' which is not currently
referenced. The path that is mentioned is where my images are stored.
FYI--ImagePath is a field that holds the path of my image and ImageFrame is
the image control.
I am relatively new at code and would appreciate any help to resolve this
issue.
Thanks
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If IsNull(Me.ImagePath) Then
Me.ImageFrame.Visible = False
errormsg.Caption = "Image Not Found"
errormsg.Visible = True
Else
Me.ImageFrame.Picture = Me.ImagePath
Me.ImageFrame.Visible = True
End If
End Sub