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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using OLE to display a JPG image



 
 
Thread Tools Display Modes
  #1  
Old September 13th, 2005, 10:49 PM
Randy Hartwick
external usenet poster
 
Posts: n/a
Default Using OLE to display a JPG image

I was following instructions from a previous post about adding a JPG image.
I was able to complete everything, however once I opened the form I received
the error message "2220...can't open the file..." The previous post
instructions we

First of all, store your pictures in a separate folder named
InventoryItemsPics.

Add a field named MyPath to your table. Include this field in the
recorsource of your form. Add a textbox named MyPicture to your form. Set
the ControlSource as MyPath. When you enter a new inventory item to your
database you will enter the path to the picture of the item in this textbox.
Comething like:
C:\InventoryItemsPics\MyInventoryItem,jpg
Add an image control named PhotoField to your form. Open properties and
under the Format tab set the Size Mode property to Stretched. Put the
following code in the AfterUpdate event of MyPicture textbox:
Me!Photofield.Picture = Me!MyPicture
Put the following code in the Current event of your form:
Me!Photofield.Picture = Me!MyPicture

That should do it!

In the table field "MyPath" I had entered
"\\Administrative\IDWorks\Database\Photos\0000.jpg ". The file 0000.jpg does
exist exactally as defined in the network path as typed into the field.

What am I missing?

  #2  
Old September 14th, 2005, 06:10 AM
Neil
external usenet poster
 
Posts: n/a
Default

The only thing that spring to mind is a mis-typing of the filenname somwehere.

If you look at www.nwarwick.co.uk and check out the Access pages, there is a
tutorial on handling pictures, which includes a routine that allows you to
use the standard windows selector box to get the filename.

HTH

Neil

"Randy Hartwick" wrote:

I was following instructions from a previous post about adding a JPG image.
I was able to complete everything, however once I opened the form I received
the error message "2220...can't open the file..." The previous post
instructions we

First of all, store your pictures in a separate folder named
InventoryItemsPics.

Add a field named MyPath to your table. Include this field in the
recorsource of your form. Add a textbox named MyPicture to your form. Set
the ControlSource as MyPath. When you enter a new inventory item to your
database you will enter the path to the picture of the item in this textbox.
Comething like:
C:\InventoryItemsPics\MyInventoryItem,jpg
Add an image control named PhotoField to your form. Open properties and
under the Format tab set the Size Mode property to Stretched. Put the
following code in the AfterUpdate event of MyPicture textbox:
Me!Photofield.Picture = Me!MyPicture
Put the following code in the Current event of your form:
Me!Photofield.Picture = Me!MyPicture

That should do it!

In the table field "MyPath" I had entered
"\\Administrative\IDWorks\Database\Photos\0000.jpg ". The file 0000.jpg does
exist exactally as defined in the network path as typed into the field.

What am I missing?

  #3  
Old May 15th, 2008, 04:36 PM posted to microsoft.public.access.forms
Srowe
external usenet poster
 
Posts: 34
Default Using OLE to display a JPG image

I have used the tutorial from the website below for adding pictures. I cut
and copied as directed but when I add a picture to one record it changes the
previous record to the same picture. Essentially I have the same picture for
every record I have.

Is there something that I am missing. I copied and pasted the code into my
database exactly.

Can anyone help?

Thanks in advance.

"Neil" wrote:

The only thing that spring to mind is a mis-typing of the filenname somwehere.

If you look at www.nwarwick.co.uk and check out the Access pages, there is a
tutorial on handling pictures, which includes a routine that allows you to
use the standard windows selector box to get the filename.

HTH

Neil

"Randy Hartwick" wrote:

I was following instructions from a previous post about adding a JPG image.
I was able to complete everything, however once I opened the form I received
the error message "2220...can't open the file..." The previous post
instructions we

First of all, store your pictures in a separate folder named
InventoryItemsPics.

Add a field named MyPath to your table. Include this field in the
recorsource of your form. Add a textbox named MyPicture to your form. Set
the ControlSource as MyPath. When you enter a new inventory item to your
database you will enter the path to the picture of the item in this textbox.
Comething like:
C:\InventoryItemsPics\MyInventoryItem,jpg
Add an image control named PhotoField to your form. Open properties and
under the Format tab set the Size Mode property to Stretched. Put the
following code in the AfterUpdate event of MyPicture textbox:
Me!Photofield.Picture = Me!MyPicture
Put the following code in the Current event of your form:
Me!Photofield.Picture = Me!MyPicture

That should do it!

In the table field "MyPath" I had entered
"\\Administrative\IDWorks\Database\Photos\0000.jpg ". The file 0000.jpg does
exist exactally as defined in the network path as typed into the field.

What am I missing?

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
MailMerge, Image Display chingy1788 Mailmerge 1 October 14th, 2005 04:18 PM
How to display a TIF image in a form Eddie D Using Forms 2 September 7th, 2005 08:59 AM
Linking v Embedded Jim Bunton General Discussion 5 August 10th, 2005 11:09 PM
How do I Get a OLE Image into a field from another table? Paul Using Forms 0 November 25th, 2004 03:15 AM
Image Control Table John Gavin General Discussion 3 June 28th, 2004 04:21 AM


All times are GMT +1. The time now is 07:15 AM.


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