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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |