Code to print Images

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
 
C

CCross

Please disregard this posting. I don't know what I did but everything works
fine now.
Thanks anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top