Darren DICK
d.dick at uws.edu.au
Mon Oct 27 18:18:03 CST 2003
Hi John Change your OLE Control on the form to a Bound OLE Control (This worked for me) Assume you have a table called tblTable1 In it is an OLE Field already populated with say...a bitmap file. The field name in the tblTable1 is OLE_THINGY (Data Type = OLE Object) Try Private Sub MyButton_Click() Dim varOLETHING As Variant varOLETHING = DLookup("[OLE_THINGY]", "tblTable1") Me.MyOLEBoundObjectFrameOnMyForm = varOLETHING End sub HTH Darren ----- Original Message ----- From: "John Bartow" <john at winhaven.net> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Tuesday, October 28, 2003 10:33 AM Subject: RE: [AccessD] A really silly and dumb - maybe even ridiculous-accessquestion > Hi Stuart: > I store application information in a table. One piece of info I store is a > graphic (as an OLE object field). I have always diplayed this on my SysInfo > form, which was a bound form. Since I use the exact same table and SysInfo > form in every application I create, I moved it to my common code library. I > changed the entire form to work from the library and had to change the > fields drawn from the table to unbound. Everything works fine now EXCEPT the > graphic. The graphic will always be stored in the table and will not be > moved to being kept as a file. > > So the question is, how do I go about reading an OLE field from the table > and presenting it for display on an unbound form? > I am trying to read it into a variant and place it into an unbound object > frame. I am not succeeding. > > JB > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Stuart > > McLachlan > > Sent: Monday, October 27, 2003 4:30 PM > > To: Access Developers discussion and problem solving > > Subject: RE: [AccessD] A really silly and dumb - maybe even ridiculous > > -accessquestion > > > > > > On 27 Oct 2003 at 16:10, John Bartow wrote: > > > > > Hi Charlotte, > > > Thanks for responding. Yes there is a reason it is stored. It > > is the only > > > image I store in any of my database apps. The rest I use from > > files as you > > > suggested. This is probably why I don't have a clue as to what > > to do here. > > > > > > I could spend a couple of hours reading up on it but I thought > > somebody here > > > would have some experience in doing this and be able to point me in the > > > right direction :o) > > > > > > > Just drop a Bound Object Frame on the form and set it's source to > > =DLookup("myImage","MyTable") > > > > -- > > Stuart McLachlan > > Lexacorp Ltd > > Application Development, IT Consultancy > > http://www.lexacorp.com.pg > > > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com