THIS IS MAKING ME CRAZY!

J

J.Alladien

Dear All,

I recently downloaded the Pictures2K MDB and I applied it to my pictures and
it works fine in the forms!

However the moment I preview it in a report some pictures get loaded onto
the report and some DON,T (please note that all items have their respective
pictures) .
This makes my Catalog very unreliable,I kept getting error 2114 :
Macces does not support the format of this file(fe PIC001) or
file is too large ,try converting the file to bitmap or gif format!

To "bypass" this error I did the following in the report:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo Err_cmdClose_Click

'set the picture path
Me.ImgStock.Picture = pathname & Me.txtStockGraph

Exit_cmdClose_Click:
Exit Sub

Err_cmdClose_Click:
If Err.Number = 2220 Or 2114 Then 'can't find the file
Resume Next
Else
MsgBox Err.Description
Resume Exit_cmdClose_Click
End If

End Sub

This worked as I did not get err 2114 anymore!

However If I preview the report now, items (who have pictures included in
myfolder)come up "BLANK" in the report!

When I load the same items in the form I have no problem cause all the
pictures get loaded! error 2114 also does not make sense to me since let's
say pic 10(10 5kb) could not get loaded due too err 2114 but pic 11 (whose
size is 140 kb) gets loaded onto the report without a problem!

Are my pics too big? is that the problem?( they vary form 105-160 kb) In
that case is there a way too filter out the records where error 2114 occurs
so that I can then resize the pics because to write down the codes one by one
each time the error message occurs is not done!

Please help!
 
K

Klatuu

Your error message is telling you exactly what the problem is. It is the
file format. Not all graphic formats are supported. As the error message
says, you need to store your picture files in a consistent supported format.
 
R

Roger Carlson

I assume the sample is mine, as I have one with that name and the code looks
identical. I've never seen this behavior myself, but then I haven't used it
in exactly your circumstances either. As far as I know, the method works
the same in forms and reports (at least it has done so for me) but reports
are NOT exactly like forms. Reports have built-in code that looks back to
the previous page for grouping and pagination and such. It's possible that
this code is interfering in some way. Do you have several pictures per
page? And if so, does the behavior stop if you had only one picture per
page?

It's also possible that you have some database corruption (or orphaned
compiled code) that is still sitting there. You might try decompiling the
database or importing all objects (and I mean ALL) to a new database.

If nothing else works, you might consider abandoning the Access reports and
use Office Automation to create the "report" in Word. On my website
(www.rogersaccesslibrary.com), is a small Access database sample called
"AutomatingWordFromAccess.mdb" which illustrates some of what you need to
do. That sample copies an excel chart into the Word document, but it would
be just as easy (easier even) to insert a stored image.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
J

J.Alladien

Dear Dave,

That's just it , all my pics are in 1 format (jpg) I don't have any other
format!
Strange thing is that the same picture(s) opens up in the form but when I
preview it in the report it goes blank!

I must say that I have a total of 800 pics ,when I preview a list of all
products F.E. pic 400,401,402 do not appear in the report, however if I make
a report based upon only these 3 records (pics) , they do show.......

Does my computer not have enough memory or....I really don't understand
 
J

J.Alladien

Dear Roger,

Yes it's your db ,meanwhile I got this answer from one of the members but I
don't understand it:

I will give you a hint: Compare the value of the Picture property in
both cases. They are different. One works, the other doesn't...

-Tom.
Microsoft Access MVP

Can you maybe clarify it for me?
 
R

Roger Carlson

Since those pictures show up in a small report but not in the large report,
I doubt if there's anything different or wrong with those pictures.

I can't really add anymore than I already have and I gave you a couple of
things to try.

Lastly, it's not really good practice to multi-post questions. (I noticed
Doug answered you in the other forum.) It spreads the answers around so
they don't do as much good and it wastes people's time. Most of us scan
multiple forums.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
J

J.Alladien

Dear Roger,

First of all my appoligies ,I thought the groups were answered seperately(I
just joined abt a few weeks ago!) ,secondly I think I found the answer ;I
downsized some of the pictures for which I was getting notifications from the
Db that they were too big and it seemed that it worked cause after that I did
not get any notifications for those files anymore!

However Is there a way( code) that the records which get these
errormessages get stored in a table ,and that I don't have to press "OK" at
each appearing message cause it's very time-consuming, the messages are not
general but specific to that record f.e.

"Macces does not support the format of this file(C:\PICS\1012.JPG) or
file is too large ,try converting the file to bitmap or gif format"

This way I can adress the records after the report has finished !

Appreciate all the help I can get, Thanks alot!
 
C

Clif McIrvin

J. -- reply in-line below:

J.Alladien said:
Dear Roger,

First of all my appoligies ,I thought the groups were answered
seperately(I
just joined abt a few weeks ago!)

I've not been here all that long myself, but I understand that limited
cross-posting is acceptable. The benefits of cross-postings include
everyone knwoing immediately that it is a cross-post (multiple
newsgroups in the To: header) and replies from any group are
automatically sent to all the cross-posted groups so members in both
(all?) groups can see and follow the entire thread.


,secondly I think I found the answer ;I
downsized some of the pictures for which I was getting notifications
from the
Db that they were too big and it seemed that it worked cause after
that I did
not get any notifications for those files anymore!

However Is there a way( code) that the records which get these
errormessages get stored in a table ,and that I don't have to press
"OK" at
each appearing message cause it's very time-consuming, the messages
are not
general but specific to that record f.e.

"Macces does not support the format of this file(C:\PICS\1012.JPG) or
file is too large ,try converting the file to bitmap or gif format"

You've already got the seed to start from in your error handler.
Err.Description has the message you want to record.

Do you know how to take the value from Err.Description and save it
somewhere, or do you need advice on that?

There have been several recent threads on the topic of error handler
code; a search in Google Groups should yield rich information.
This way I can adress the records after the report has finished !

Appreciate all the help I can get, Thanks alot!

HTH!
 
C

Clif McIrvin

J.Alladien said:
Dear Clif,

Yes I would very much like some advise on that!

Hopefully someone else will pick up on this .... I know it's possible,
and I recall seeing discussions that would relate but it's not something
that I've done yet.

I'll have to do a bit of research before I can get back with a
suggestion.

Did you try searching Google Groups yet?

This search looks to produce useful hits:
http://groups.google.com/group/micr...=microsoft.public.access&q=error+handling+log

"Is there a way to create an error log in Access" should be a good place
to start.

HTH
 
D

dirk en hilde

J.Alladien said:
Dear All,

I recently downloaded the Pictures2K MDB and I applied it to my pictures
and
it works fine in the forms!

However the moment I preview it in a report some pictures get loaded onto
the report and some DON,T (please note that all items have their
respective
pictures) .
This makes my Catalog very unreliable,I kept getting error 2114 :
Macces does not support the format of this file(fe PIC001) or
file is too large ,try converting the file to bitmap or gif format!

To "bypass" this error I did the following in the report:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo Err_cmdClose_Click

'set the picture path
Me.ImgStock.Picture = pathname & Me.txtStockGraph

Exit_cmdClose_Click:
Exit Sub

Err_cmdClose_Click:
If Err.Number = 2220 Or 2114 Then 'can't find the file
Resume Next
Else
MsgBox Err.Description
Resume Exit_cmdClose_Click
End If

End Sub

This worked as I did not get err 2114 anymore!

However If I preview the report now, items (who have pictures included in
myfolder)come up "BLANK" in the report!

When I load the same items in the form I have no problem cause all the
pictures get loaded! error 2114 also does not make sense to me since let's
say pic 10(10 5kb) could not get loaded due too err 2114 but pic 11 (whose
size is 140 kb) gets loaded onto the report without a problem!

Are my pics too big? is that the problem?( they vary form 105-160 kb) In
that case is there a way too filter out the records where error 2114
occurs
so that I can then resize the pics because to write down the codes one by
one
each time the error message occurs is not done!

Please help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top