Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form OLE field Link for .JPG files 3

Status
Not open for further replies.

arwhite

MIS
Nov 1, 2002
3
US
After setting up an OLE field on my form and using it to link picture files to records, I noticed that it increased the size of the table the form is based upon from 10 MB to over 100MB. As each additional picture is linked to a record, the table size increases again by several MB.

The link was not supposed to do this, since it was only supposed to record the path to the picture file and not embed the picture itself. In fact, the picture files are only 50 to 100k in size until they are linked. If I look at the picture properties (on the form) after they are linked, they have also greatly increased in size, typically to over 2 MB.

I tried embedding instead of linking but that was even worse. In all other aspects, this field works fine.

I would appreciate any help anyone can give me. Thanks.
 
Sorry, not an aswer, but the same problem. I link to a .jpg of 103K and the database size increases by over 1Meg. Incidentally, it does not matter if I link or import.

Can anybody help here as I have now got the "database full" message, and this will grind to a halt if I cannot find a fix.

All assistance greater appreciated.
 
I just tried adding an image to my form using a link and the size of my DB just grew a very very little bit. I don't know why you guys are having this problem. Try giving some more detail on how you linked you pictures.
 
Nat,

Ok will do tonight when I get home.

Looking at the "help" file it seems that the difference between linking and importing is that if the original of a linked image is changed, then that change is reflected in the database, whereas the imported version remains unchanged.

I am using Access 97

Thanks, talk later.
 
Hi BobChesh,

You are right about the difference between linking and importing. The concept is that when importing a picture,
a full copy of the actual pic is imported whithin your
program. Once done, the imported picture has absolutly
nothing in common with the original pic.
When linking a pic, all your program knows is the address
in memmory to the original pic. Upon opening the form your program will search for the location of the original pic
and open it in your form. That explains the difference between the two when changing the original pic. It also explains the difference in the growth of the DB size when importing or linking.

natatbh
 
Nat,

Hmm.

Size, as they say does not matter.

The db increases by the same amount if I link or import, so it looks like for some reason that even if I link, it actually grabs the image, and also stores the address of the source so it can update. I wonder if is in one of the options functions. But this issue is the same as that reported by arwhite in Nov 2002.

I have overcome it after a fashion by using a hyperlink, but that presents its own problems later, as I cannot set a default path to the appropriate folder.

Still hoping for a better solution

Bob
 
Hi BobChesh,

There is a huge difference in size between importing and linking pictures. What happens is that when you put a
picture on your form it is imported by default. This
makes the size of the DB grow to the size of imported
pictures. Now, even if you change it to linked the size
will still be the same.
To fix this compact your DB after changing your pictures to linked. You'll see a huge difference in size.

natatbh
 
Natatbh

Even more confused now!

I import an image, by "Create from File", get the file using the Browse option, set the link check box, and "OK".

The image is show, but the database has grown by about a meg.

I compact the database and it is still the same size as in the paragraph about, i.e. about a meg bigger than before I "linked" the image.

I must be doing something wrong, but I now have three people having a look at this.

The machine is about to go out of the window!!!
 
Hi BobChesh,

Let's get this straightend out. As it seems to me, you are using an "Unbound Object Frame" to put the picture on your form.
Use an "Image" instead. Then go to the images properties and set the "Picture Type" property to "Linked" and compact your DB.

This works without doubt, I tried it several times.

natatbh
 
natatbh

You're right, it works. Brill.

But the problem I have is that the form is used to hold pictures of damage to cars, so the form is linked to a table, which is linked to a whole lot of things via the Reg no., which is why I use OLE Bound Object Frame.

So I suppose what I am saying is that I need to store just the Address of the object, but still show a thumbnail picture. I guess this is the problem, Access stores a picture rather than a link to the picture, and the only way to overcome it is to use a hyperlink, although I may try doing both, although I cannot see how to link an image in Form view, I can only do it Design view.

But at least I understand more of what is going on (and so do the rest of us here!!!)

Very much appreciated, and I hope to hear from you soon.


Bob
 
Hi BobChesh,

I'm just a little bit confused on what your'e trying to do.
Mabey you can explain to me in a little more detail what
you're trying to display on your form. Then I might be
able to give you an idea of how to tackle you're disgruntling experience.

natatbh
 
natatbh,

OK here goes.

I am building a datbase for an insyrance assessor for vehicle damage. I have a main form contaning vehicle details (reg no., owners address etc etc) and several sub forms grouped with various bits of the vehicle (Engine, bodywork, chassis, electrics, Steeruing and suspension etc) Each bit of dat is entered by a drop down (Good, Fair, Renew etc) so at the end of each data entry a full set of details about the damge to the vehicle is obtained. Eachj sub form is linked by Reg No. We have got round the possibility of more that one accident to any car by using a unique key as well.

The assessor take pictures of the damage to the vehicle (up to 6 for any one vehicle) and then downloads them as jpegs.

One of the subforms is used to display the pictures of the damage, albeit as a small picture, so that we can also present these pictures in report format and E mail to the Insurance company if required.

So this is where the "link object" comes in. If we insert a linked jpeg, the the database grows almost exponetially. I was hoping that the picture would be seen as a link, but it seems it is a real picture. This is what I want to resolve.

Hope this helps.

Bob
 
Hi BobChesh,

First of all use an image as I told you before. You can store addresses to your pictures in a text field in your DB, such as

"C:\Documents and Settings\naftalif\My Documents\My Pictures\Sample.jpg"

All you then have to do is create an empty image control on your form and set its picture property to any of the pictures in the DB and it would display that picture.

EX. vba code,

Me.Picture = "C:\Documents and Settings\naftalif\My Documents\My Pictures\Sample.jpg"

For example you'll have a path to a pic in each record. You can then create a hidden text box on your form which will
hold the path field. When the user goes to the next record
you grab that hidden path and display the picture as mentioned above. In this way the user will be able to pass
through picture after picture for each car.

natatbh

 
natatbh,

Muchos thanks. It looks like it works. I have modified the code though, since the user may not always put the imgae in the same folder.

So, by using a Hyperlink in a text box, I then use this value as the variable 'Pathname', and then the image which you showed me how to insert is then assigned the 'Pathname', so the user winds up with a small image of the car, and if they want to see it bigger, select the hyperlink.

So natantbh, once again thanks for you time and patience, and have a star, it is well worth it, and saved me a great deal of heartache.


Bob

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top