Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pictures in forms/reports 1

Status
Not open for further replies.

dmacmurc

Programmer
Jun 9, 2007
7
CA
A couple of years ago there was a very useful thread ( thread702-289543 i) which dealt with this topic, but it has been closed, and unfortunately not all the questions got answered, at least not that I can see.

One in particular was submitted by NorthNone in June of 2003, which asked about an error on loading JPG images. The error number was -2147417848, with the message "Method 'picture' of object '_Image' failed"

NorthNone pointed out that this occurred when loading JPG images, but not BMPs. I am experiencing this, using the same approach the thread described for loading the images, and I wonder whether a cause and (especially) a resolution was ever described.

Can anyone shed some light on this?

Many thanks ...
 
Thanks, remou, that might be helpful because a nasty aspect of this issue is that the progress dialog remains displayed even after Access is closed, and only a re-boot will clear it. Being able to suppress the dialog might at least make the crash less brutal.

But what I'm really after is avoiding the problem to begin with. I'm finding this especially troublesome because it's inconsistent: for several records in succession the image will load correctly, and then for some reason the failure occurs.
 
Apparently, supressing the dialog can cure the problem.
 
It certainly makes a big improvement. I tried the registry hack that was Dev's option (A) without success, in that even with the ShowProgressDialog key set to "No" the dialog still appeared and persisted, but the code approach definitely helps.

What I'm now finding is that the error can still occur, but the user can acknowledge the message, clear the dialog and then proceed as though nothing had happened, since the image seems to load eventually in any case. Not ideal, but far better than it was, and probably acceptable.

Thanks again, Remou
 
I 'fixed' this problem by disabling rapid scrolling through records in my form. To move to a new record they have to pick a name from a drop list. Clunky but effective.

"Character cannot be developed in ease and quiet. Only through experience of trial and suffering can the soul be strengthened, ambition inspired, and success achieved." - Helen Keller
 
Thanks, NorthNone - you're the one I was hoping to hear from on this. No disrespect to Remou, but I saw that you had faced this in 2003 (I think?) and wondered if you'd ever found a tidy solution.

I arrived at the same point myself: in my app, the intent was to change the image as the user selected different buildings in a listbox, with the image control's picture string being retrieved from a subform. When I went to changing the picture property on clicking a control on the subform, things seem OK. As you say, clunky, but it seems to work.
 
I wondered if the reason .bmp files don't have this problem is because they are larger and take longer to load than .jpg files. The longer load time gives the system a tad bit longer to catch up with what is going on; hence no error message.
Just a hunch. I have no scientific studies to support this :)

"Character cannot be developed in ease and quiet. Only through experience of trial and suffering can the soul be strengthened, ambition inspired, and success achieved." - Helen Keller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top