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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JPGs display in Image field - sometimes

Status
Not open for further replies.

BallunarCrew

Programmer
Sep 3, 2006
58
US
thread181-1735294
I have had to export all files from a table of attachments fields due to the 2G file size limitation. The files are now stored in folders under a patient's name. There is a table that is an index to these files. I have a form, based on that table, that has an image object on it to displays the image. The image files are all JPGs. Sometimes they display and sometimes they don't. For a patient, records 1-3 show just fine but the next 4 pictures will not display when I scroll through the records. It is always the same ones that won't display All the images open properly when accessed from the file system. The files are not large. One that opens is 361 kb and one that won't open is 250 kb. Any ideas?
 
What version of Access? Can you verify that these are in fact jpgs and not something else with a jpg extension? I have a freeware program that actually does that and reads the file headers. Use some program that has a image conversion utility. Irfanview is free and can convert most images to true jpg.
 
>One that opens is 361 kb and one that won't open is 250 kb

remember that jpegs are compressed images - so the file size is not the actual size occupied in memory when the jpeg is expanded to a bitmap (which it is). So it is still remotely possible that it is a size-related issue
 
MajP - This is Access 2013. I appreciate the ideas. I used FileFormat.info to see what format one of the files is and it says it is JPG. I used Irfanview to "convert" this file to JPG and it is a smaller file now. I saved it under a new name and put it in the folder with the links. When I scroll through the records now, the file that would not show yesterday shows file and the new one showed when I first added it and as I scroll around, sometimes it shows and sometimes it does not. This now seems to be completely random except the first couple of files always displays. Access is just being Access, I guess.

Update - About 6-7 minutes after I saw it not display the file it gave me the message the format is not supported or the file it too large. This is a file that was displayed earlier and Access took that long to give me that message - crazy. I can just see the look on the doctor's face if I tell him he has to wait 6-7 minutes to see if Access if going to display the file.

Strongm - I don't think I knew this fact - good information to know but as I state above, this is so random.
 
Assuming that your form is a single patient at a time kind of a deal, and assuming that you did not have this problem when the pictures were ole objects in your database, could you have a table that stores Jpg's, and the on current event of your form deletes the records from that table, then goes and gets the Jpg's for the selected patient and puts them in that table so it's back to the way it was when it worked, but a tad different?

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That DonÆt.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top