abcctech
asked on
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\Blan k.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
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\Blan
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
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\Blan k.jpg"
End If
If Not Me!txtPicture = "" Or Not IsNull(Me!txtPicture) Then
Me!Picture.Picture = GetPathPart & Me!txtPicture
Else
Me!Picture.Picture = "N:\Common\Board\Pics\Blan
End If
ASKER
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\Blan k.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!
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\Blan
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!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
http://support.microsoft.com/default.aspx?scid=kb;en-us;294255&Product=acc
ASKER
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.
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.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
The entire name is there already?
Me thinks this is the reason for the error.
;-)
JeffCoachman