Photos in Access2000

  • Thread starter Thread starter Steve Kipping
  • Start date Start date
S

Steve Kipping

Guest
We have a database where we track construction photos. I have linked the digital photos (not embedded) to keep the database file smaller. We have a default image (name.jpg) that simply states “Add Name to Path”. I have included some coding in the “after update” of our ImagePath field as outlined by a Microsoft knowledge base entry.

Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

This displays the image that in noted in the ImagePath field. This works fine as long as you input a legitimate file name/path. However if for some reason you keyin a bogus name (typo or whatever), it displays the last legitimate picture. If your not careful, you end up posting the wrong picture. To help this I added some coding to the “before update” option of my ImagePath field.

Private Sub ImagePath_BeforeUpdate(Cancel As Integer)
On Error Resume Next
Me![ImageFrame].Picture = "y:\photos\images\name.jpg"
End Sub

This helps considerably since it displays my NAME.jpg image. However, if you move to the next record and return, it now displays the last legitimate image again and not my name.jpg file.

Any ideas,
Thanks,
SKK
 
Dave,

You may have posted it a hundred times, but I hadn't seen it.

Very Nice!

Wayne
 

Users who are viewing this thread

Back
Top Bottom