By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,145 Members | 1,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,145 IT Pros & Developers. It's quick & easy.

Problem with an image control

P: n/a
This routine fails intermittently at line 6, when I try to set the Picture
property of an Image object. It throws error 2001: You canceled the
previous operation.

1. cFile = "D:\logos\" & frm.BrandCode & ".gif"
2. If Dir(cFile) = "" Then
3. frm.imageBrand.Visible = False
4. frm.lblNoImage.Visible = True
5. Else
6. frm.imageBrand.Picture = cFile
7. End If

It happens only the first time I load up this form after starting Access.
After that, it never happens, even with the same image .gif file. It
happens if the code is in the Open or Load or Current event of the form.

Strange, huh?

I went into the Registry and set:

HKEY_LOCAL_MACHINE\Software\Microsoft\ Shared Tools\Graphics
Filters\Import\GIF\Options\ShowProgressDialog key value to "No".

Seems to have helped, but I'll know for sure in the next day or so.

Dec 14 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.