Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel as an OLE Object OR another way to display mult sheets on a repo

Status
Not open for further replies.

KyleS

Programmer
Oct 23, 2001
619
US
OK,

Let's start off with my current quandry. I can't seem to be able to locate the command to embed and Excel sheet into my Access '97 field (OLEObject). I know I can do it manually, and I know I can do it through a form one at a time, but this needs to be automated. there should just be a command I'm not finding (been searching the archives for a day and a half now, as well as all of pscode.com and any other place I can think of). which will put the Object into the OLE field

ie

rstA.Field("Whatever").WHAT COMMAND GOES HERE "FilePath"

I'm pretty sure that in VB it's "CreateEmbed" but Access 97 ain't buyin' that...

BACKGROUND

If you're wondering why in the heck I would do this horrendous thing, allow me to elaborate (if you don't care, please skip to the part where you answer my question :eek:) )

I have a dB that has a pic per record in one of our tables (sometimes more, but let's only worry about the one for now) and since Access 97 is all I'm given to work with, I have to make do. I can't store the pics in Access even if I wanted to, since the need to be editable (circles, colors, text) and VERY easy for the lay-person to use. So since they all Like Excel, and Excel has some decent pic controls I went that route. And I can't link the files in and I certainly can't imbed them because as it is the dB is over 75 MB without any OLE objects and they are only using it on about 10% of their work. So add in 500 or so Excel files and you can see that that isn't an option... What I am doing is storing the Excel files' network path in a text field and updateing my unbound OLE frame on the form in the On_Current of said form. Now, this all works out beautifully until I need to print my summary report WITH pictures. When I do that it won't update (a problem I was aware of, but I figured since I'm in a hurry I'll burn that bridge when I come to it, well, I'm at it :eek:) ) so I'm gonna use a temp table and load the files into access then remove them as to keep the permanant size down.

Kyle
 
Try acOLECreateEmbed

I honestly wish you the best of luck.

Bill
 
Bill,

Thanks, that was my first thought too, but isn't that only for Action? And Action requires a control, which requires a form...

I would LOVE to be able to do this through code, without a form...

Kyle

Kyle
 
I'm going to let this one go as I don't know of any way to replace a manual embed or coded embed initialised through a form via code.

As I said, I honestly wish you the best of luck.

Bill
 
Thanks for giving it a shot Bill. If you come across anything, be sure and post ; )

Now anyone else...?

Kyle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top