Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

Linking Pictures

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill - 22 Apr 2008 09:38 GMT
Hi All,

I have a form that shows a small picture of an object. When I
link to the image I check the 'link' box, thinking that it will do just
that. However my database file is growing rapidly and I have discovered that
the images are obviously embedded in the mdb file because they are still
visible when the file is loaded on a PC that does not have access to the
original linked images.

Can anyone tell me what I am doing wrong please? By the way this is on an
Access 2000 database.

Regards.
Bill.
=Ray= - 22 Apr 2008 15:02 GMT
You say you check the 'link' box... how are you getting to this checkbox?
I have a picture object which is linked as well, but the option to link or
embed it is in the properties window.

I am using Acess 2000 and I couldn't find a way to have a "picture field" at
all, so I just have a few lines of VBA code to update the picture, and I have
the path for the link entered in a field in the database.

Could you tell me how you put a picture field?
Ray

> Hi All,
>
[quoted text clipped - 10 lines]
> Regards.
> Bill.
Bill - 22 Apr 2008 15:20 GMT
To start with I created a field in the table and set data type to 'OLE
Object'

Then from the toolbox I created a 'Bound Object' frame.

I set the control source of the bound object to the name of the field that I
created in the table.

When the form is run opened I right click on the bound object frame and
choose insert object.

I check the box create from file and the dialogue for browsing to the file
appears, including the link check box. I have to admit that it seems a bit
contrived so I might be doing it wrong, but it works!!

But as I said, pictures are being embedded NOT linked!!!

Regards.
Bill.

> You say you check the 'link' box... how are you getting to this checkbox?
> I have a picture object which is linked as well, but the option to link or
[quoted text clipped - 24 lines]
>> Regards.
>> Bill.
Bill - 22 Apr 2008 15:36 GMT
Sorry sabout the rushed typing - I should have stated explicitly in the 2nd
paragraph that the bound object frame is created in the form. Might confuse
some!!
=Ray= - 22 Apr 2008 16:55 GMT
The only thing I can think of is to set the OLE Type Allowed property to
"Linked" as an extra measure. Then the link checkbox will be checked and
disabled, but one wouldn't think that would actually give any different
result.

I'm really only a novice, though, so maybe someone else has a better answer.
Ray

> To start with I created a field in the table and set data type to 'OLE
> Object'
[quoted text clipped - 44 lines]
> >> Regards.
> >> Bill.
phillip - 22 Apr 2008 18:44 GMT
Hi Ray,   (and Bill):
Ole Object type controls in a table will always store the object within the
database. That the "Ole Type Allowed" be set to linked or embedded makes no
difference to the size of the storage.
If you are storing pictures the size of the database will also grow
considerably because Access stores them uncompressed as bitmaps, wether the
original file is a jpeg or not.
Another way to display pictures that are not stored within the database is
to use "Image" controls in a form. The Image control finds the picture in a
folder of your hard drive and displays it in the original format, for
instance ".jpg" . The picture is not stored in the database and therefore
it's size doesn't change at all.

Which control type to use, and wether you store or not, depends basically on
how you want to view the pictures... how you have to display them.
If you can view them one record at a time, with the form's "default view"
property set to "Single form", then you don't need an Ole Object type of
field in the table. You will need some field, either in that table or in
another one, with the ddress of the pictures in the folder in your hard
disk.
For instance in a products table you would have a text field that names the
picture for that product (say, "pic") Then you can either have a field for
the full address of the folder (say, "path") or refer to it in the form's
module window. you trigger the picture event with a command button or the
forms Current property, such as:

Private Sub Command36_Click()
Me!Image35.Picture = Me!ProdPath & [ProductsByCategorySfrm2].Form![Pic]
End Sub

   ' where the [Pic] is in a separate subform, in another table.
Or, if you don't have a path field and your pics are all in one place, then:
(This report is a catalogue with a several hundred pictures, none of them
bound and using an "image" field)

Private Sub GroupHeader5_Print(Cancel As Integer, PrintCount As Integer)
If Me!Pic = "Empty.jpg" Then
   Me!pHOTO.Visible = False
   Else: Me!pHOTO.Picture = "C:\MyDocuments\Products\Jpegs\" & Me!Pic
End If
End Sub

The "Empty.jpg", or blank picture, is necessary to display something when
there is no pic, or make the control invisible until a valid pic comes
along.

Now, the second option: If you want to view the pictures in continuous
forms, then you have to use Ole Object fields, bound object frame controls
and a big database. This is because Access will refer to the picture on the
record that has the focus (and you'll see lots of the same pic if you use an
unbound image control...) Bound Object Frame controls are the only way
Access can deal with different pics displayed per record in a continuous
form.
The good side of all this is that Access behaves quite nicely regardless of
the size of the data. Picture databases of over 3 Gb that work very light
and fast are quite common. I'm building one with 6800 pics that grew to 4.5
Gb so far and it's working like a charm!!

Hope this helps

Signature

Kind regards,
Phillip Carrero.

Carrero Art* a lifestyle of creativity,

> The only thing I can think of is to set the OLE Type Allowed property to
> "Linked" as an extra measure. Then the link checkbox will be checked and
[quoted text clipped - 65 lines]
>> >> Regards.
>> >> Bill.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.