A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding a photo to a record



 
 
Thread Tools Display Modes
  #1  
Old June 25th, 2009, 07:04 AM posted to microsoft.public.access
Ken G
external usenet poster
 
Posts: 16
Default Adding a photo to a record

I've tried to add some photos to an Access 2003 database using OLE linking to
the photo in a separate folder.
In Form View the database field only shows the file name (no path), not the
picture. These are the steps I've taken.
Click in the field and select Insert Object/Crearte from File/Browse
Select the file then click "Link" and make sure Display as Icon is not ticked.
The field is formatted as OLE.
Does the picture need to be EXACTLY the same size as the field in the
database?

  #2  
Old June 25th, 2009, 02:53 PM posted to microsoft.public.access
Arvin Meyer MVP
external usenet poster
 
Posts: 640
Default Adding a photo to a record

Instead of embedding or linking, try just using the path to an image as the
Picture property of an image control. Here's a sample of how to do that:

http://www.datastrat.com/Download/Picture2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Ken G" wrote in message
...
I've tried to add some photos to an Access 2003 database using OLE linking
to
the photo in a separate folder.
In Form View the database field only shows the file name (no path), not
the
picture. These are the steps I've taken.
Click in the field and select Insert Object/Crearte from File/Browse
Select the file then click "Link" and make sure Display as Icon is not
ticked.
The field is formatted as OLE.
Does the picture need to be EXACTLY the same size as the field in the
database?



  #3  
Old June 25th, 2009, 03:11 PM posted to microsoft.public.access
Fred
external usenet poster
 
Posts: 1,451
Default Adding a photo to a record

Reinforcing what Arvin said, we learned the hard way that doing it with OLE
in 2000/2002/3003 is nothing but trouble.
  #4  
Old June 25th, 2009, 06:33 PM posted to microsoft.public.access
Arvin Meyer MVP
external usenet poster
 
Posts: 640
Default Adding a photo to a record

"Fred" wrote in message
...
Reinforcing what Arvin said, we learned the hard way that doing it with
OLE
in 2000/2002/3003 is nothing but trouble.


It's more resource intensive than trouble. On beefy machines there's little
to worry about, but on many machines the resources get used up quickly,
leaving the problems you've seen.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


  #5  
Old June 26th, 2009, 12:46 AM posted to microsoft.public.access
Ken G
external usenet poster
 
Posts: 16
Default Adding a photo to a record


Thanks Arvin. Obviously I'm not an Access expert, but this seems to create
a database of pictures in a folder.

I'm trying to include individual pictures in individual records in a database.


"Arvin Meyer MVP" wrote:

Instead of embedding or linking, try just using the path to an image as the
Picture property of an image control. Here's a sample of how to do that:

http://www.datastrat.com/Download/Picture2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Ken G" wrote in message
...
I've tried to add some photos to an Access 2003 database using OLE linking
to
the photo in a separate folder.
In Form View the database field only shows the file name (no path), not
the
picture. These are the steps I've taken.
Click in the field and select Insert Object/Crearte from File/Browse
Select the file then click "Link" and make sure Display as Icon is not
ticked.
The field is formatted as OLE.
Does the picture need to be EXACTLY the same size as the field in the
database?




  #6  
Old June 26th, 2009, 01:34 AM posted to microsoft.public.access
Arvin Meyer MVP
external usenet poster
 
Posts: 640
Default Adding a photo to a record

If you put all your pictures in a single folder on your (or a server's) hard
drive, you can display them. The table creation is for the purpose of
gathering your pictures and loading the paths into the database. You can
then use that table by linking it to your other data tables, or perform an
update query to add the file and path columns to your existing table.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Ken G" wrote in message
...

Thanks Arvin. Obviously I'm not an Access expert, but this seems to
create
a database of pictures in a folder.

I'm trying to include individual pictures in individual records in a
database.


"Arvin Meyer MVP" wrote:

Instead of embedding or linking, try just using the path to an image as
the
Picture property of an image control. Here's a sample of how to do that:

http://www.datastrat.com/Download/Picture2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Ken G" wrote in message
...
I've tried to add some photos to an Access 2003 database using OLE
linking
to
the photo in a separate folder.
In Form View the database field only shows the file name (no path), not
the
picture. These are the steps I've taken.
Click in the field and select Insert Object/Crearte from File/Browse
Select the file then click "Link" and make sure Display as Icon is not
ticked.
The field is formatted as OLE.
Does the picture need to be EXACTLY the same size as the field in the
database?






  #7  
Old June 26th, 2009, 02:22 AM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Adding a photo to a record

On Thu, 25 Jun 2009 16:46:01 -0700, Ken G
wrote:


Thanks Arvin. Obviously I'm not an Access expert, but this seems to create
a database of pictures in a folder.

I'm trying to include individual pictures in individual records in a database.


Think about it:

What the user needs is to be able to open a database, select a record, and see
a picture.

Arvin's solution does EXACTLY THAT.

It's a matter of technique. Be aware that Access (up until version 2007) does
let you store images in the table, but it does so *very inefficiently* - a 20K
jpg file is stored as a 20K jpg *AND ALSO* as a .bmp image that may be 200 or
300K. It doesn't take very many of these monstrous records to make your
database bloat beyond the 2GByte storage limit.
--

John W. Vinson [MVP]
  #8  
Old July 2nd, 2009, 05:14 AM posted to microsoft.public.access
Ken G
external usenet poster
 
Posts: 16
Default Adding a photo to a record

Thanks again Arvin. It took me a while to get my head around this but I now
have it working in my database, with one problem remaining.

My database allows for up to four pictures for each record, and I adapted
the code from the picture2k file to do this. The problem is, and it was there
when I began with the code for just one picture, that if a picture is
included in record A, it also appears in record B even though there is
nothing in the path and file name fields for record B. In my case of multiple
photos, if Record A has say 3 photos, and record B has only 2, the third
photo from Record A is displayed in Record B as photo number 3.

Do you know how I can prevent this. The same thing happens when entering a
new record. It already has the pictures from the previous record on display.

"Arvin Meyer MVP" wrote:

If you put all your pictures in a single folder on your (or a server's) hard
drive, you can display them. The table creation is for the purpose of
gathering your pictures and loading the paths into the database. You can
then use that table by linking it to your other data tables, or perform an
update query to add the file and path columns to your existing table.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Ken G" wrote in message
...

Thanks Arvin. Obviously I'm not an Access expert, but this seems to
create
a database of pictures in a folder.

I'm trying to include individual pictures in individual records in a
database.


"Arvin Meyer MVP" wrote:

Instead of embedding or linking, try just using the path to an image as
the
Picture property of an image control. Here's a sample of how to do that:

http://www.datastrat.com/Download/Picture2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Ken G" wrote in message
...
I've tried to add some photos to an Access 2003 database using OLE
linking
to
the photo in a separate folder.
In Form View the database field only shows the file name (no path), not
the
picture. These are the steps I've taken.
Click in the field and select Insert Object/Crearte from File/Browse
Select the file then click "Link" and make sure Display as Icon is not
ticked.
The field is formatted as OLE.
Does the picture need to be EXACTLY the same size as the field in the
database?







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.