G
Guest
I am working in Access2000. I need to use a lot of pictures in my database. I
have a field named 'Picture' that is a text field and I store the path to the
image there. The following is the code I use to make Access show the correct
image on the report in an image frame.
Option Compare Databas
-----------------------------------------------------------------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
Me![Image86].Picture = Me![Picture]
End Su
------------------------------------------------------------------------------------------
Private Sub Report_Activate()
On Error Resume Next
Me![Image86].Picture = Me![Picture]
End Su
-----------------------------------------------------------------------------------------
Private Sub Report_Page()
On Error Resume Next
Me![Image86].Picture = Me![Picture]
End Su
------------------------------------------------------------------------------------------
The problem is this: When Access encounters a null in the field, (there is
no picture), it defaults to the previous picture or the first picture viewed.
I want it to default to a bmp I made that says “no image available†I used
the no picture bmp to create the image control on the form in the first
place. Do I need some code that follows “On Error†to tell access to display
the no picture bmp. I am marginally proficient at code,(I know just enough to
be dangerous!)
Thanks, Pam
have a field named 'Picture' that is a text field and I store the path to the
image there. The following is the code I use to make Access show the correct
image on the report in an image frame.
Option Compare Databas
-----------------------------------------------------------------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
Me![Image86].Picture = Me![Picture]
End Su
------------------------------------------------------------------------------------------
Private Sub Report_Activate()
On Error Resume Next
Me![Image86].Picture = Me![Picture]
End Su
-----------------------------------------------------------------------------------------
Private Sub Report_Page()
On Error Resume Next
Me![Image86].Picture = Me![Picture]
End Su
------------------------------------------------------------------------------------------
The problem is this: When Access encounters a null in the field, (there is
no picture), it defaults to the previous picture or the first picture viewed.
I want it to default to a bmp I made that says “no image available†I used
the no picture bmp to create the image control on the form in the first
place. Do I need some code that follows “On Error†to tell access to display
the no picture bmp. I am marginally proficient at code,(I know just enough to
be dangerous!)
Thanks, Pam