Hello - I was reading the (closed) thread702-289543 in an attempt to solve a problem I have.
I am building a database to log my tools and I wanted to include a photo of each item. I added the field "ImagePath" into the table and placed an image into the form, named "ImageFrame". The following code was then used:
Now this works perfectly until I exit the database! When I open it up again, each record shows the default image (that has been placed into the records where I have not yet taken a photo).
If I delete the ImageFrame picture in the form and create it again, it works. As you can imagine, it is a bit of a pain to do this each time I open the database.
I read somewhere that the image that I selected to add the image into the form should be deleted (i.e. leave “Picture” blank in the image properties). I tried this and it simply prevents any picture from being shown.
Any help is greatly appreciated,
Darren.
p.s. I have no idea what my user type means - there wasn't a "has no idea what he is doing" option!
I am building a database to log my tools and I wanted to include a photo of each item. I added the field "ImagePath" into the table and placed an image into the form, named "ImageFrame". The following code was then used:
Code:
Private Sub Form_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub
Now this works perfectly until I exit the database! When I open it up again, each record shows the default image (that has been placed into the records where I have not yet taken a photo).
If I delete the ImageFrame picture in the form and create it again, it works. As you can imagine, it is a bit of a pain to do this each time I open the database.
I read somewhere that the image that I selected to add the image into the form should be deleted (i.e. leave “Picture” blank in the image properties). I tried this and it simply prevents any picture from being shown.
Any help is greatly appreciated,
Darren.
p.s. I have no idea what my user type means - there wasn't a "has no idea what he is doing" option!