REPOST: Help needed! Linked files get embedded.

P

Paul Telco

Hi,

I have a simple Access 97 DB which I would like to hold various records with
the pictures associated with them.

It works fine but up until now I've been embedding JPG images and the
database has become far too big. It's only about a quarter of its intended
size but already exceeds 600MB.

The image files themselves are kept on the same PC in another folder so I
would like to link to them instead of embedding them.

Problem:

Even though I use the following code, straight out of the MS Access
handbook, the images remain embedded.

Private Sub SetOLEImage(ImageFile$)
' Attach Image file to field for OLEDiagram

OLEDiagram.Class = "Bitmap Image" ' Set class name.
OLEDiagram.OLETypeAllowed = acOLELinked ' Specify type of object.

OLEDiagram.SourceDoc = ImageFile$ ' Specify source file.

OLEDiagram.Action = acOLECreateLink ' Attach the image
OLEDiagram.SizeMode = acOLESizeZoom ' Adjust control size
Me.Refresh

End Sub


I don't see how this can be when OLEDiagram.OLETypeAllowed = acOLELinked
and OLEDiagram.Action = acOLECreateLink.

I can happily delete the original files folder and the pictures still appear
in my reports. They are definately embedded and that is why the .MDB is so
big.

Can anyone tell me how to link properly?

Many thanks as always,


Paul Telco
 
P

Paul Telco

Arvin,

Thanks for your reply, I will probably use your method to stop linked files
from embedding.

Do you have any idea why the OLETypeAllowed = acOLELinked and
acOLECreateLink result in embedded files?

It's a mystery to me!

Thanks again,

Paul
 
A

Arvin Meyer

Paul Telco said:
Arvin,

Thanks for your reply, I will probably use your method to stop linked files
from embedding.

Do you have any idea why the OLETypeAllowed = acOLELinked and
acOLECreateLink result in embedded files?

It's a mystery to me!

Access is storing the bitmap it uses to display the file. Access cannot
display jpg's without a filter, so it stores a bitmap to ensure you'll be
able to see them.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
P

Paul Telco

Arvin,

Is it time for me to upgrade?

Do later version of Access include the filter required for linked jpgs?

Many thanks again,

Paul
 
A

Arvin Meyer

No version of Access includes the capacity to natively use iimages other
than bmps. There are some alternatives, like loading the image into an image
control at runtime. See my sample application that does that:

http://www.datastrat.com/Download/Picture.zip

The above is for Access 97. There's also a version on the site for 2K and
later. If you want to embed images, you can use the DBPix control:

http://www.ammara.com/
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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