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
|
|||
|
|||
linking/embedding images
I am using Office 2003. Included is an example database named Northwind.mdb
that has an image associated with each record. I am try to mimic that function. In my database I have a field of type OLE Object. When I try to use "Insert Object" to associate an image with this field I get an error message that says "The connection with the OLE server was lost, or the OLE server encountered an error while you were using it.". In trying to figure out what was going on I found a site that claims that Office 2003 does not provide an OLE server. Does this mean that the Northwind example is using some other technique to have an image in a record? I am hoping someone with be able to point me to an example with step-by-step instructions on how to achieve this. Thank you very much for reading all this! |
#2
|
|||
|
|||
well first let me warn you that embedding lots of images i.e. per record -
is dangerous because it bogs down your db with so much size. but with that warning aside in my A2003; in table design view - you define the field using the pull down as an OLE object then in the table in table view where you actually add data; in that field, right click and then select 'insert object', and then you are presented with a button choice of 'Create New' or 'Create from File'. Select Create from File and then one just browses to wherever the image file is found and selects. that's how it works for mine. One additional thought - your error message possible might occur if you have copied in a pre-existing DB that had already a defined link to an image source which is no longer working......in any case a sanity check with a virgin new db and new table may be helpful -- NTC "Tom Gettys" wrote: I am using Office 2003. Included is an example database named Northwind.mdb that has an image associated with each record. I am try to mimic that function. In my database I have a field of type OLE Object. When I try to use "Insert Object" to associate an image with this field I get an error message that says "The connection with the OLE server was lost, or the OLE server encountered an error while you were using it.". In trying to figure out what was going on I found a site that claims that Office 2003 does not provide an OLE server. Does this mean that the Northwind example is using some other technique to have an image in a record? I am hoping someone with be able to point me to an example with step-by-step instructions on how to achieve this. Thank you very much for reading all this! |
#3
|
|||
|
|||
Thanks for your reply. I did do what you suggested, and that is what
provoked the error message. I am pretty sure that is how it used to work, but not how it works in Office 2003. "NetworkTrade" wrote: well first let me warn you that embedding lots of images i.e. per record - is dangerous because it bogs down your db with so much size. but with that warning aside in my A2003; in table design view - you define the field using the pull down as an OLE object then in the table in table view where you actually add data; in that field, right click and then select 'insert object', and then you are presented with a button choice of 'Create New' or 'Create from File'. Select Create from File and then one just browses to wherever the image file is found and selects. that's how it works for mine. One additional thought - your error message possible might occur if you have copied in a pre-existing DB that had already a defined link to an image source which is no longer working......in any case a sanity check with a virgin new db and new table may be helpful -- NTC "Tom Gettys" wrote: I am using Office 2003. Included is an example database named Northwind.mdb that has an image associated with each record. I am try to mimic that function. In my database I have a field of type OLE Object. When I try to use "Insert Object" to associate an image with this field I get an error message that says "The connection with the OLE server was lost, or the OLE server encountered an error while you were using it.". In trying to figure out what was going on I found a site that claims that Office 2003 does not provide an OLE server. Does this mean that the Northwind example is using some other technique to have an image in a record? I am hoping someone with be able to point me to an example with step-by-step instructions on how to achieve this. Thank you very much for reading all this! |
#4
|
|||
|
|||
Here is previous post of mine on this subject:
"ylmxw" wrote: Can we stick limited formats of pictures on the field attributed as ""OLE" in access? In fact we know .BMP pictures are allowed. Now is .jpg Format allowed in Access? Stephen Lebans Nov 29 2004, 7:52 pm show options Newsgroups: microsoft.public.access.forms From: "Stephen Lebans" - Find messages by this author Date: Mon, 29 Nov 2004 20:52:36 -0400 Local: Mon,Nov 29 2004 7:52 pm Subject: .jpg pictures are allowed to store as OLE objects? Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse The format of the image file is completely independant of Access. It is the responsibility of whatever Image/Paint program is currently registered with WIndows to view the Image file types and act as the OLE server for the object inserted into the OLE object field. MS Photo Editor is generally used as the OLE server for Access. It must be setup and registered to handle the selected image file types. Before I explain how to setup Photo Editor to be registeredd for the relevant Image file types one note of caution. Images embedded as OLE objects will quickly fill up your MDB. A small 40KB JPG can end up consuming several MB's in storage space. If you are planning on storing a large number of images or even a few extremely high resolution images then you should not be using OLE. Why do Images embedded as OLE objects take up so much storage space? In a nutshell: An Image inserted as an OLE object is no longer the same size as the original file. It is converted to a DIB(uncompressed Bitmap) and then wrapped in a EMF(Enhanced Metafile). THe EMF is then wrapped within the OLE stream. Further, if the original Image was not a Bitmap or Metafile, then another full size DIB preview is inserted into the OLE stream. THe only reasons to use an OLE object field are if you requi 1) The ability for your users to Edit the Image in the Program that acts as the OLE server. 2) The ability to view the Images with a Form in Continuous View. 3) The Images are embedded for security concerns. In reality, the enormous OLE file size "bloating" stops most users from inserting more than a few images. With the exception of viewing the images with a Form in Continuous view, coding solutions for the other 2 issues are available. The most common solution is to simply keep the images in a seperate folder storing the filenames only in a Text field. Using the Current event of the Form or the Format event of the relevant section on a Report, place a line of code to load the picture into the standard Image control NOT the OLE Frame control. Me.NameOfPictureControl.Pictur*e = Me.NameOfTextBoxBoundToFileNam*eField There is lots of sample code out there complete with error checking. Search GoogleGroups. ********************************************** Here is a previous post of mine on for how to setup MS Photo Editor: Message 4 in thread From: Stephen Lebans ) Subject: Inserting picture into an access form View this article only Newsgroups: microsoft.public.access.active*xcontrol Date: 2004-11-12 19:43:08 PST In this case the OLE server is simply an Image/paint program that: 1) Can function as an OLE Image server 2) Is registered to handle the specific Image file types you want to insert into the OLE obect field. In most cases, MS Photo Editor is used as the OLE Server program. It must though, be setup as the default/registered handler for the image file types in question. MS Photo Editor is no longer included with Office 2003. YOu will have to find you Office XP or WIn2K disks and install MS Photo Editor only! The simplest method to associate a program with a specific file extension(BMP,JPG,etc.) is to: 1) Open a folder containing the Images you want to insert. 2) Right click on a file while holding down the SHift key. 3) From the popup menu select "Open With". 4) Scroll down the Open With Dialog window until you find MS Photo Editor and select it. 5) Check the Always use this program to open this file type CheckBox control. 6) Click OK. Repeat the steps once for each different type of Image file you want to embedd in your table. ********************************************** -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Tom Gettys" wrote in message ... Thanks for your reply. I did do what you suggested, and that is what provoked the error message. I am pretty sure that is how it used to work, but not how it works in Office 2003. "NetworkTrade" wrote: well first let me warn you that embedding lots of images i.e. per record - is dangerous because it bogs down your db with so much size. but with that warning aside in my A2003; in table design view - you define the field using the pull down as an OLE object then in the table in table view where you actually add data; in that field, right click and then select 'insert object', and then you are presented with a button choice of 'Create New' or 'Create from File'. Select Create from File and then one just browses to wherever the image file is found and selects. that's how it works for mine. One additional thought - your error message possible might occur if you have copied in a pre-existing DB that had already a defined link to an image source which is no longer working......in any case a sanity check with a virgin new db and new table may be helpful -- NTC "Tom Gettys" wrote: I am using Office 2003. Included is an example database named Northwind.mdb that has an image associated with each record. I am try to mimic that function. In my database I have a field of type OLE Object. When I try to use "Insert Object" to associate an image with this field I get an error message that says "The connection with the OLE server was lost, or the OLE server encountered an error while you were using it.". In trying to figure out what was going on I found a site that claims that Office 2003 does not provide an OLE server. Does this mean that the Northwind example is using some other technique to have an image in a record? I am hoping someone with be able to point me to an example with step-by-step instructions on how to achieve this. Thank you very much for reading all this! |
#5
|
|||
|
|||
Thank you for your lengthy reply Stephen! I now understand that I do not
want to deal with OLE objects, that I want to have a text field that has the path/filename of my images, and that I want my form to use this field to display the image. I don't know how to do that however. I am unclear what you meant when you suggested that I "search GoogleGroups"; I know what Google is, but not GoogleGroups. What would I search for the locate the information I am seeking? "Stephen Lebans" wrote: Here is previous post of mine on this subject: "ylmxw" wrote: Can we stick limited formats of pictures on the field attributed as ""OLE" in access? In fact we know .BMP pictures are allowed. Now is .jpg Format allowed in Access? Stephen Lebans Nov 29 2004, 7:52 pm show options Newsgroups: microsoft.public.access.forms From: "Stephen Lebans" - Find messages by this author Date: Mon, 29 Nov 2004 20:52:36 -0400 Local: Mon,Nov 29 2004 7:52 pm Subject: .jpg pictures are allowed to store as OLE objects? Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse The format of the image file is completely independant of Access. It is the responsibility of whatever Image/Paint program is currently registered with WIndows to view the Image file types and act as the OLE server for the object inserted into the OLE object field. MS Photo Editor is generally used as the OLE server for Access. It must be setup and registered to handle the selected image file types. Before I explain how to setup Photo Editor to be registeredd for the relevant Image file types one note of caution. Images embedded as OLE objects will quickly fill up your MDB. A small 40KB JPG can end up consuming several MB's in storage space. If you are planning on storing a large number of images or even a few extremely high resolution images then you should not be using OLE. Why do Images embedded as OLE objects take up so much storage space? In a nutshell: An Image inserted as an OLE object is no longer the same size as the original file. It is converted to a DIB(uncompressed Bitmap) and then wrapped in a EMF(Enhanced Metafile). THe EMF is then wrapped within the OLE stream. Further, if the original Image was not a Bitmap or Metafile, then another full size DIB preview is inserted into the OLE stream. THe only reasons to use an OLE object field are if you requi 1) The ability for your users to Edit the Image in the Program that acts as the OLE server. 2) The ability to view the Images with a Form in Continuous View. 3) The Images are embedded for security concerns. In reality, the enormous OLE file size "bloating" stops most users from inserting more than a few images. With the exception of viewing the images with a Form in Continuous view, coding solutions for the other 2 issues are available. The most common solution is to simply keep the images in a seperate folder storing the filenames only in a Text field. Using the Current event of the Form or the Format event of the relevant section on a Report, place a line of code to load the picture into the standard Image control NOT the OLE Frame control. Me.NameOfPictureControl.PicturÂ*e = Me.NameOfTextBoxBoundToFileNamÂ*eField There is lots of sample code out there complete with error checking. Search GoogleGroups. ******************************Â**************** Here is a previous post of mine on for how to setup MS Photo Editor: Message 4 in thread From: Stephen Lebans ) Subject: Inserting picture into an access form View this article only Newsgroups: microsoft.public.access.activeÂ*xcontrol Date: 2004-11-12 19:43:08 PST In this case the OLE server is simply an Image/paint program that: 1) Can function as an OLE Image server 2) Is registered to handle the specific Image file types you want to insert into the OLE obect field. In most cases, MS Photo Editor is used as the OLE Server program. It must though, be setup as the default/registered handler for the image file types in question. MS Photo Editor is no longer included with Office 2003. YOu will have to find you Office XP or WIn2K disks and install MS Photo Editor only! The simplest method to associate a program with a specific file extension(BMP,JPG,etc.) is to: 1) Open a folder containing the Images you want to insert. 2) Right click on a file while holding down the SHift key. 3) From the popup menu select "Open With". 4) Scroll down the Open With Dialog window until you find MS Photo Editor and select it. 5) Check the Always use this program to open this file type CheckBox control. 6) Click OK. Repeat the steps once for each different type of Image file you want to embedd in your table. ******************************Â**************** -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Tom Gettys" wrote in message ... Thanks for your reply. I did do what you suggested, and that is what provoked the error message. I am pretty sure that is how it used to work, but not how it works in Office 2003. "NetworkTrade" wrote: well first let me warn you that embedding lots of images i.e. per record - is dangerous because it bogs down your db with so much size. but with that warning aside in my A2003; in table design view - you define the field using the pull down as an OLE object then in the table in table view where you actually add data; in that field, right click and then select 'insert object', and then you are presented with a button choice of 'Create New' or 'Create from File'. Select Create from File and then one just browses to wherever the image file is found and selects. that's how it works for mine. One additional thought - your error message possible might occur if you have copied in a pre-existing DB that had already a defined link to an image source which is no longer working......in any case a sanity check with a virgin new db and new table may be helpful -- NTC "Tom Gettys" wrote: I am using Office 2003. Included is an example database named Northwind.mdb that has an image associated with each record. I am try to mimic that function. In my database I have a field of type OLE Object. When I try to use "Insert Object" to associate an image with this field I get an error message that says "The connection with the OLE server was lost, or the OLE server encountered an error while you were using it.". In trying to figure out what was going on I found a site that claims that Office 2003 does not provide an OLE server. Does this mean that the Northwind example is using some other technique to have an image in a record? I am hoping someone with be able to point me to an example with step-by-step instructions on how to achieve this. Thank you very much for reading all this! |
#6
|
|||
|
|||
See the KB articles he
http://www.mvps.org/access/forms/frm0030.htm -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Tom Gettys" wrote in message ... Thank you for your lengthy reply Stephen! I now understand that I do not want to deal with OLE objects, that I want to have a text field that has the path/filename of my images, and that I want my form to use this field to display the image. I don't know how to do that however. I am unclear what you meant when you suggested that I "search GoogleGroups"; I know what Google is, but not GoogleGroups. What would I search for the locate the information I am seeking? "Stephen Lebans" wrote: Here is previous post of mine on this subject: "ylmxw" wrote: Can we stick limited formats of pictures on the field attributed as ""OLE" in access? In fact we know .BMP pictures are allowed. Now is .jpg Format allowed in Access? Stephen Lebans Nov 29 2004, 7:52 pm show options Newsgroups: microsoft.public.access.forms From: "Stephen Lebans" - Find messages by this author Date: Mon, 29 Nov 2004 20:52:36 -0400 Local: Mon,Nov 29 2004 7:52 pm Subject: .jpg pictures are allowed to store as OLE objects? Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse The format of the image file is completely independant of Access. It is the responsibility of whatever Image/Paint program is currently registered with WIndows to view the Image file types and act as the OLE server for the object inserted into the OLE object field. MS Photo Editor is generally used as the OLE server for Access. It must be setup and registered to handle the selected image file types. Before I explain how to setup Photo Editor to be registeredd for the relevant Image file types one note of caution. Images embedded as OLE objects will quickly fill up your MDB. A small 40KB JPG can end up consuming several MB's in storage space. If you are planning on storing a large number of images or even a few extremely high resolution images then you should not be using OLE. Why do Images embedded as OLE objects take up so much storage space? In a nutshell: An Image inserted as an OLE object is no longer the same size as the original file. It is converted to a DIB(uncompressed Bitmap) and then wrapped in a EMF(Enhanced Metafile). THe EMF is then wrapped within the OLE stream. Further, if the original Image was not a Bitmap or Metafile, then another full size DIB preview is inserted into the OLE stream. THe only reasons to use an OLE object field are if you requi 1) The ability for your users to Edit the Image in the Program that acts as the OLE server. 2) The ability to view the Images with a Form in Continuous View. 3) The Images are embedded for security concerns. In reality, the enormous OLE file size "bloating" stops most users from inserting more than a few images. With the exception of viewing the images with a Form in Continuous view, coding solutions for the other 2 issues are available. The most common solution is to simply keep the images in a seperate folder storing the filenames only in a Text field. Using the Current event of the Form or the Format event of the relevant section on a Report, place a line of code to load the picture into the standard Image control NOT the OLE Frame control. Me.NameOfPictureControl.PicturÂ*e = Me.NameOfTextBoxBoundToFileNamÂ*eField There is lots of sample code out there complete with error checking. Search GoogleGroups. ******************************Â**************** Here is a previous post of mine on for how to setup MS Photo Editor: Message 4 in thread From: Stephen Lebans ) Subject: Inserting picture into an access form View this article only Newsgroups: microsoft.public.access.activeÂ*xcontrol Date: 2004-11-12 19:43:08 PST In this case the OLE server is simply an Image/paint program that: 1) Can function as an OLE Image server 2) Is registered to handle the specific Image file types you want to insert into the OLE obect field. In most cases, MS Photo Editor is used as the OLE Server program. It must though, be setup as the default/registered handler for the image file types in question. MS Photo Editor is no longer included with Office 2003. YOu will have to find you Office XP or WIn2K disks and install MS Photo Editor only! The simplest method to associate a program with a specific file extension(BMP,JPG,etc.) is to: 1) Open a folder containing the Images you want to insert. 2) Right click on a file while holding down the SHift key. 3) From the popup menu select "Open With". 4) Scroll down the Open With Dialog window until you find MS Photo Editor and select it. 5) Check the Always use this program to open this file type CheckBox control. 6) Click OK. Repeat the steps once for each different type of Image file you want to embedd in your table. ******************************Â**************** -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Tom Gettys" wrote in message ... Thanks for your reply. I did do what you suggested, and that is what provoked the error message. I am pretty sure that is how it used to work, but not how it works in Office 2003. "NetworkTrade" wrote: well first let me warn you that embedding lots of images i.e. per record - is dangerous because it bogs down your db with so much size. but with that warning aside in my A2003; in table design view - you define the field using the pull down as an OLE object then in the table in table view where you actually add data; in that field, right click and then select 'insert object', and then you are presented with a button choice of 'Create New' or 'Create from File'. Select Create from File and then one just browses to wherever the image file is found and selects. that's how it works for mine. One additional thought - your error message possible might occur if you have copied in a pre-existing DB that had already a defined link to an image source which is no longer working......in any case a sanity check with a virgin new db and new table may be helpful -- NTC "Tom Gettys" wrote: I am using Office 2003. Included is an example database named Northwind.mdb that has an image associated with each record. I am try to mimic that function. In my database I have a field of type OLE Object. When I try to use "Insert Object" to associate an image with this field I get an error message that says "The connection with the OLE server was lost, or the OLE server encountered an error while you were using it.". In trying to figure out what was going on I found a site that claims that Office 2003 does not provide an OLE server. Does this mean that the Northwind example is using some other technique to have an image in a record? I am hoping someone with be able to point me to an example with step-by-step instructions on how to achieve this. Thank you very much for reading all this! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sizing images in slides | RonM | Powerpoint | 14 | March 3rd, 2006 08:38 PM |
linking/embedding images | Tom Gettys | Using Forms | 0 | May 23rd, 2005 06:13 PM |
Large documents containing many images | Javier | Formatting Long Documents | 0 | January 12th, 2005 06:26 PM |
Images don't print when printing from PDF | TomAL | Publisher | 1 | May 5th, 2004 09:22 AM |