Change image on button with code

Anthony George

Registered User.
Local time
Today, 08:16
Joined
May 28, 2004
Messages
105
Hi Everyone

When creating a Command button you can click the picture builder to the right of the picture property and select a picture from the dropdown list of bmp pics that access already has built in.

What I would like to do is to change the image on the button if a text box on another form has text in it or not.

I can do this ok with external pictures or text in the caption property but i would really like to use one of the other images that are on the built in list but I cant find the path or code to find where they live.

Anyone have any ideas?

Many thanks for any help given

Tony
 
odds are these are built into a dll somewhere and just from scanning the web a little on the the topic i dont think it will be an easy task. Why not download an icon pack from the web (there are literally millions out there) and utilize them. Heck you may be able to find an icon pack replica of the default icon list in access.
 
Hi Josephff

Thank's for your reply. Do you know I had not really thought of a dll. The reason that I didn't want to use external graphics is in case I wanted to give the program away to others. Oh well I guess I will have to use external images after all and zip them up with the program.
many thank's for your inspiration.

Tony
 
Hi Josephff

Thank's for your reply. Do you know I had not really thought of a dll. The reason that I didn't want to use external graphics is in case I wanted to give the program away to others. Oh well I guess I will have to use external images after all and zip them up with the program.
many thank's for your inspiration.

Tony

even though you use external images, they should still show up no matter who uses it, without having to use a zip file. Try it: set a form with an image (on a button, or image control) then open it on another pc, you should still be able to see the image without having the actual image file on the other pc. i used icons for buttons on a previous program i built at my office. if i use the program at my home i can still see all the icons even though they are not stored locally.

see attached for screenshot
 

Attachments

  • MainDirection.JPG
    MainDirection.JPG
    59.9 KB · Views: 130
Hi Josephff

All I can say is WOW

Having never tried that before I would not have thought it possible.

That's a real help to me and thankyou again for the info.

Kindest regards

Tony
 
I believe you can refer to those images by their FaceID. Lookup an Access add-in called V-tools. It's not something I've really tried to do, as I have only used the FaceID for the shortcut menu. If you use that add-in, look at the form DIB Pictures (?) for the FaceIDs.

edit-Here is the link.
 

Users who are viewing this thread

Back
Top Bottom