refresh image control

P

Phil

How do you refresh an image control on a form, I have a form that displays a
company logo dependent on the field companylogo the image is stored in a
folder and its path is stored in logolocation in the table trust, in the on
current event of the form I have me.logoimage.picture=me.logolocation, this
works in that the logo is displayed on the form and in eisting records it
will change when I change the coompany on the form, however it will not
display when I goto new record I input all the data and have to go next
recor, previous to get the image to display

Hope someone can help

Phil
 
E

ErezM via AccessMonster.com

hello phil
since there is now picture to show in the on current event of a new record,
the form doesnt show anything. note that it will also happen if you change an
image of an existing record (again, to see the change you will need to move
to another record and then come back, so the OnCurrent event will fire)

so what you need to do is reload the image in the AfterUpdate event of
logolocation textbox(?) as well as the Current event of the form. that way,
new records as well as old, changing records, will show the right image as
soon as it is specified

good luck
Erez
 
P

Phil

Hi Eraz

Thanks for your reply unfortunately that does not work, I have tried to
reload image using after update event but it remains blank,

Thanks anyway

Phil
 
P

Phil

Hi Gina

Thank you, you made me think about this one, and I realised I had code in
the on current event of the form to make the image control not visible if
[trust] was null

Thank you

Phil
 
G

Gina Whipp

Phil,

Thinking is good! Glad you got it figured out...

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Phil said:
Hi Gina

Thank you, you made me think about this one, and I realised I had code in
the on current event of the form to make the image control not visible if
[trust] was null

Thank you

Phil

Gina Whipp said:
Phil,

Might help if you show the code that is not working...

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top