MS Access. Linked .jpgs keep on embedding!

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 to the
OLEDiagram field
OLEDiagram.SizeMode = acOLESizeZoom ' Adjust control size for the
OLEDiagram picture
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
 

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