problem with Pictures database !

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 but in the reports I get errors# 2114

code being used in forms:

Private Sub Form_Current()
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 Then 'can't find the file
Resume Next
Else
MsgBox Err.Description
Resume Exit_cmdClose_Click
End If
End Sub

CODE BEING USED IN REPORT IS:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.ImgStock.Picture = pathname & Me.txtStockGraph
End Sub

I have about 1500 pics and all of them open in the forms but when I preview
them in a report I get err 2114 which claims that fe pic10 is too large to be
formatted but that does not make sense to me since there are much larger pics
then pic10 which open up fine,why do they open up in the forms but not in the
reports?

Hope somebody can help me!
 
T

Tom van Stiphout

Dear All,

I recently downloaded the Pictures2K MDB and I applied it to my pictures and
it works fine in the forms but in the reports I get errors# 2114

code being used in forms:

Private Sub Form_Current()
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 Then 'can't find the file
Resume Next
Else
MsgBox Err.Description
Resume Exit_cmdClose_Click
End If
End Sub

CODE BEING USED IN REPORT IS:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.ImgStock.Picture = pathname & Me.txtStockGraph
End Sub

I have about 1500 pics and all of them open in the forms but when I preview
them in a report I get err 2114 which claims that fe pic10 is too large to be
formatted but that does not make sense to me since there are much larger pics
then pic10 which open up fine,why do they open up in the forms but not in the
reports?

Hope somebody can help me!
 
T

Tom van Stiphout

On Mon, 21 Jul 2008 18:08:00 -0700, J.Alladien

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
 
J

J.Alladien

Tom,

I put the exact picture-properties in the report as in the form but I still
get 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!

Why is access able to load the pictures in the form but not in the report?
The same pictures I get errors for when loading the report ,I can open
without problems in the forms!

Am I doing something wrong?
 
J

J.Alladien

Dear Tom

Can you please clarify , I don't understand it, I probably did it wrong!
What do you mean with Compare the value of the Picture property in
both cases. They are different. One works, the other doesn't...
 
T

Tom van Stiphout

On Tue, 22 Jul 2008 10:38:18 -0700, J.Alladien

<sigh> Here are the two values straight from the code you posted:
#1: pathname & "\" & Me.txtStockGraph
#2: pathname & Me.txtStockGraph

To me they look different and will produce either a legal path or an
illegal one.

-Tom.
 
J

J.Alladien

Thanks Tom

Tom van Stiphout said:
On Tue, 22 Jul 2008 10:38:18 -0700, J.Alladien

<sigh> Here are the two values straight from the code you posted:
#1: pathname & "\" & Me.txtStockGraph
#2: pathname & Me.txtStockGraph

To me they look different and will produce either a legal path or an
illegal one.

-Tom.
 

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