bobbobruns12
Technical User
Hey I am trying to create a cover sheet for a report in my database. I have placed an image frame on the report to call up the image path stored in one of my access tables. However I created a "default" picture that I want to put into my VB code to input it if no image path for a picture is available. My code looks like this and works if the file contains a picture, however whenever there is not a picture available it runs type mismatch. Am I missing something?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull(Me![ImagePath]) Then
Me![CoverImageFrame].Picture = Me![ImagePath]
Else
Me![CoverImageFrame].Picture = "c:\Documents and Settings\Kevin F Bransfield\Desktop\pictures\nophoto.bmp"
End If
End Sub
Thanks for your help
Bob
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull(Me![ImagePath]) Then
Me![CoverImageFrame].Picture = Me![ImagePath]
Else
Me![CoverImageFrame].Picture = "c:\Documents and Settings\Kevin F Bransfield\Desktop\pictures\nophoto.bmp"
End If
End Sub
Thanks for your help
Bob