Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
How to relink icons to buttons
Jose Melean 
    
2 years ago
Hi Richard and all,

I linked the icons (images) that go in some of the buttons in our FE's forms instead of embedding them.

The images are in a group SharePoint folder syncing locally, the FE is installed in the user's HD, thus depending on the user's name the actual address will change for the local copy of the SP folder.

Looking up in the internet, the way to relink the icons is to write a script that goes over all the forms in the database, checks for all buttons and if there's an image, changes que link to the appropriate address.

My question is: is there a less cumbersome way to relink icons to forms' buttons?

I guess the second part of the question is which is better, linking the icons or embedding them into the buttons?

I prefer linking them because if we want to change one icon, we only have to copy the new file in the folder (with the same name) and it will bring it up to the buttons without need of changing each individual form.

Thanks
Kevin Yip  @Reply  
     
2 years ago
Embedding images is much preferred.  If an image is linked, and if the source file is moved or deleted, you will get a run-time error every time the image control is shown.  But an embedded image will not give an error even if the source image file has been moved or deleted.

The only reason to use link instead of embed is when you have a situation where the image content is changed but not its path.  For instance, you have a big and small version of MyImage.JPG, to be used for high and low resolution.  When you need to switch, you just copy the right "MyImage.JPG" to the image location.  Thus, neither the name nor the path of the image is changed, yet the user will see either a big or small image.  This scenario is where "link" will be useful.

Writing code to modify embed/link all images is an essential part of having a "dynamic" system to manage images, so you have to do it anyhow.  If you have 100 forms, you'll have to do it for all of them, no getting around that.  You can set up a global procedure to do all the work.  Each form will only need to run that procedure when it opens.  E.g.:

     Private Sub Form_Open(Cancel As Integer)
          SetupButtonImages
     End Sub
Sami Shamma  @Reply  
             
2 years ago
Embedding images will bloat the data base and depending on size can cause problems aw well as space issues. it is on the Evil Access Stuff for a good reason.
Kevin Yip  @Reply  
     
2 years ago
Button images tend to be small and won't cause too much bloating.  If the image paths are moved often, using embedded images is good for avoiding *untrappable* run-time errors.  An error caused by an invalid linked image path isn't caused by VBA code, so it can't be trapped (unless you use code to open the form, such as DoCmd.OpenForm).
Alex Hedley  @Reply  
           
2 years ago
Optimize the images and just use the Access Updater if you ever need to roll out a new version.
Sami Shamma  @Reply  
             
2 years ago
fair point
Jose Melean OP  @Reply  
    
2 years ago
Thanks everyone for the comments.
Sami Shamma  @Reply  
             
2 years ago
Access Updater is amazing

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

Next Unseen

 
New Feature: Comment Live View
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 11:43:34 AM. PLT: 0s