Updating linked images in a form

malform

Registered User.
Local time
Today, 02:18
Joined
Aug 8, 2006
Messages
21
I have this label maker database, and it has an option for the user to select an image to use on the label they are making. It took me forever to figure out how to add functionality to change the image via a button and selection window. And now that I have it figured out, the darn thing doesnt update when you change it unless you close the form and re-open it.

Please take a look and see what I have done wrong. I thought I had everything, so I am just really clueless.

Thank you very much for your time.
 

Attachments

Mine updates the image without a problem, it just can't find: shorts.jpg
 
Mine updates the image without a problem, it just can't find: shorts.jpg

So, if you click the change button, and select another image, the image changes? For me it changes the path, but doesnt update the imagebox. Unless I close the form and the open it again that is.
 
My change button is not enabled but now that I know where to look I'll check the code.
 
My change button is not enabled but now that I know where to look I'll check the code.

Yeah, by default it isnt enabled... You have to click that checkbox next to it for the custom logo option.
 
Controls that are completed with code do *not* invoke a lot of the events in the control like the AfterUpdate event. If I were you, I would create a new SubRoutine called say ImageUpdate() and put: Me![ImageFrame].Picture = Me![ImagePath] in it. Then call this sub from the Current Event of the form and the AfterUpdate event of the ImagePath control *and* that cmdAddSmall command button after you set the value of the ImagePath control.
 
Controls that are completed with code do *not* invoke a lot of the events in the control like the AfterUpdate event. If I were you, I would create a new SubRoutine called say ImageUpdate() and put: Me![ImageFrame].Picture = Me![ImagePath] in it. Then call this sub from the Current Event of the form and the AfterUpdate event of the ImagePath control *and* that cmdAddSmall command button after you set the value of the ImagePath control.


Well... I did everything you said... I made the subroutine, and I added it to the places you said... But it still doesnt seem want to update.

Nevermind.... I did a little more messing around, and I got it! yay

Thank you so very much for your time.
 
I did it to my copy and it works just fine. What code do you have under the cmdAddSmall button?
 
In fact, here's the db back with the changes. Did I misunderstand the issue?
 

Attachments

Initially I couldnt get it to work. But I messed around with it a little, and found that I had the imageupdate call in the wrong place of all the button functions. But I got it.

Thank you very much for your time.
 

Users who are viewing this thread

Back
Top Bottom