Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Refresh image on userform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Graham S - 21 Mar 2006 22:45 GMT
I have created a userform to manage a simple database.  On the userform is an
image control which shows a (small) picture from the current record.  As I
scroll through the database, the image changes happily.  So far so good.
I have now added a click event to the image which loads the current record
picture into a second image control which is contained on a large, but
currently invisible, frame.  I then make the frame visible, which gives the
illusion of showing a larger version of the original picture.  This larger
image has a click event which simply sets the frame's visible property to
false, hiding the image and returning the user to the original form.  Again,
all works well.
Now for the problem...  the first image control with the small picture (on
line 2 above!) no longer updates as I continue to scroll through the data.  
If I click the image again, the correct 'blow-up' appears, but the small
image does not refresh.
I tried an alternative approach using a second user form to show the
enlarged pcture but still the same problem.
Can anyone suggest a remedy (aside from using Access!!)?
Thanks
Signature

Graham

Harald Staff - 21 Mar 2006 23:39 GMT
Hi Graham

Without the possibility to test your setup, this is the general cure for
things like that:

DoEvents
Me.Repaint
DoEvents

HTH. Best wishes Harald

> I have created a userform to manage a simple database.  On the userform is an
> image control which shows a (small) picture from the current record.  As I
[quoted text clipped - 14 lines]
> Can anyone suggest a remedy (aside from using Access!!)?
> Thanks
Graham S - 22 Mar 2006 22:45 GMT
Your suggestion worked.  I'd tried the DoEvents but on its own that wasn't
enough.  The Repaint was not obvious but did the trick.  Many thanks.
Signature

Graham

> Hi Graham
>
[quoted text clipped - 28 lines]
> > Can anyone suggest a remedy (aside from using Access!!)?
> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.