Run-Time error 2114

Hi,
I am creating a report in Access 2003 on a Win xp sp3 pc.  I keep getting this message on different records:
  "Run-Time error '2114'  ABC Board doesn't support the format of the file  "K:\GB Photos\IM Photos\Smith_Jane.jpg, or file is too large. Try converting the file to BMP or GIF format."
I'm storing the file locations in the database.   I'm using this code to display the picture on the report:
 If Not Me!txtPicture = "" Or Not IsNull(Me!txtPicture) Then
         Me!Picture.Picture = GetPathPart & Me!txtPicture
 Else      
         Me!Picture.Picture = "N:\Common\Board\Pics\Blank.jpg" & Me!txtPicture
 End If
 The report contains about 98 records.  I can see the pictures then the error pops up...
All of the photos are jpg's.  Range in size from 1500 kb to 115kb.  I've downsized the pictures that I get the error on but now I'm getting it on the 115kb one....  
What can I do to create this report without errors?
Thanks,
  Donna
abcctechAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
Why are you concatenating "Me!txtPicture" to the "Blank" image.

The entire name is there already?

Me thinks this is the reason for the error.
;-)

JeffCoachman
0
Jeffrey CoachmanMIS LiasonCommented:
So try this:
 
  If Not Me!txtPicture = "" Or Not IsNull(Me!txtPicture) Then
         Me!Picture.Picture = GetPathPart & Me!txtPicture
 Else      
         Me!Picture.Picture = "N:\Common\Board\Pics\Blank.jpg"
 End If
0
abcctechAuthor Commented:
Hi,
 I put this code in like you suggested:
 If Not Me!txtPicture = "" Or Not IsNull(Me!txtPicture) Then
         Me!Picture.Picture = GetPathPart & Me!txtPicture
     Else
          Me!Picture.Picture = "N:\Common\Board\Pics\Blank.jpg"
     End If
But I'm still getting the error.  I got it this time on a 1550kb picture.  Is that too big?  Is there a size limit for the jpg's??
 Thanks for you help and answering so quickly!
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Jeffrey CoachmanMIS LiasonCommented:
1. Chek the actual format of the picture.
You can have an Access database named: BigCar.mdb, and simply rename it to BigCar.jpg.

Just becasue you rename, it does not make it an image,
So when the Image viewer (OLE Server) tries to open it, it will fail.

2. I have seen this happen because of the "Number" of images, not really the size.
(For example I can open a report with only one 5 mb jpg, and it views fine)
How many images are being loaded?
If you shrink the image to half, does it view this image OK?
(also, are you displaying more than one image on a page?)

JeffCoachman
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:
Also see this link for more info on what might case this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;294255&Product=acc
0
abcctechAuthor Commented:
1. Chek the actual format of the picture.
You can have an Access database named: BigCar.mdb, and simply rename it to BigCar.jpg.
  **All of the pictures I've had a problem with so far have been real jpg's.  I will check all of them.

Just becasue you rename, it does not make it an image,
So when the Image viewer (OLE Server) tries to open it, it will fail.

2. I have seen this happen because of the "Number" of images, not really the size.
(For example I can open a report with only one 5 mb jpg, and it views fine)
How many images are being loaded?
  **There are 98 records,  12 do not have  a picture (so I use the blank.jpg)
      So I guess there are 98 images being loaded

If you shrink the image to half, does it view this image OK?
  **I've shrunk it more than half, it works then I recently had it come up as an error again
        started at 1640 kb, I shrunk it to 115kb, it was ok, now it came back up as a problem...
         This is really puzzling...

(also, are you displaying more than one image on a page?)
     ** yes, 4 to a page.  It's a pictorial directory with their pictures and some info about them.
0
Jeffrey CoachmanMIS LiasonCommented:
< started at 1640 kb, I shrunk it to 115kb, it was ok, now it came back up as a problem...>
"Came back up"?

Do you mean it still errored on the same image, or are you saying it errored on a subsequent image.

In a broad sense, Access must "Render" each image on a page.
If you have multiple High resolution images on one page, this may cause the error you are having. Because Access may simply run out of memory to process the image.

1. I doubt it will help, but you can try this system as a form, instead of a Report.

2. If you can't get this going in a native Access application, then consider this product:
http://www.ammara.com/
It is a program that is specifically designed to display linked or embedded images in Access.
There is a trial version you can download.

3. If not, then you may want to consider moving this system to a "DeskTop Publishing Application".
http://desktoppub.about.com/od/software/f/software_list.htm

JeffCoachman
0
abcctechAuthor Commented:
Hi,
  I was finally able to create the report.  As you suggested I checked to make sure all were jpg's and they were.  Then I 'resized' each photo.  From the 1200kb range  to between 20kb - 80kb.  Then I was able to create the report without any errors.
Thanks so much Jeff for your help!!!
  Donna
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.