Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Seminars > Imaging >
Back to Access Imaging Seminar    Comments List
Upload Images   Link   Email  
Imaging Seminar FollowUp
Edward Mastoloni 
       
2 years ago
I have implemented the imaging seminar instructions, to handle displaying images outside the database by creating a field to the image path. Everything works great... until someone deletes the image in the folder. I need some error handling code for when the image is no longer found.  At the moment the database is just showing a debug error and stops everything else.
Edward Mastoloni OP 
       
2 years ago
here the sub routine that handles the image:

Private Sub UpdateImage()

    If Not IsNull(ImageFileName) Then
        ProductImage.Visible = True
        ProductImage.Picture = ImageFileName
    Else
        ProductImage.Visible = False
    End If

End Sub
Kevin Robertson 
          
2 years ago
You can check to see if the file or folder exists.
Access Developer 31
Scott Axton 
          
2 years ago
The other strategy is when a user adds an image to the folder, it is copied up to the "server folder", as shown in the imaging seminar,  and you don't allow deletes.   You only allow a record to be marked as inactive and or require admin approval to delete an image.
Edward Mastoloni OP 
       
2 years ago
Scott, I don't believe that is an option as too many people have access.  I think I need an error handling that displays some default image if the image file is missing and/or has been renamed.  This way reports that call the image based on the path don't just crap out when it can't find the image too.
Edward Mastoloni OP 
       
2 years ago
Thanks for the help.  This was my fix, because I wanted to show an error picture if the original file name was changed or image deleted.

Private Sub UpdateImage()

    If Not IsNull(ImageFileName) Then
        ' Test image exists
     Dim DFE As String
     DFE = Dir(ImageFileName)
        If DFE = "" Then
            ProductImage.Visible = True
            ProductImage.Picture = "\\p7920\Shared Files\Pics\ERROR1.jpg"
        Else
            ProductImage.Visible = True
            ProductImage.Picture = ImageFileName
        End If
    Else
        ProductImage.Visible = False
    End If
    
End Sub

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Imaging Seminar.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/27/2025 6:22:55 PM. PLT: 1s