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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE question

Status
Not open for further replies.

jgarnick

Programmer
Feb 16, 2000
189
US
I am new to OLE--I have a table of buildings and one of the fields is called inventory. I have made this field type OLE object. Only a couple of the buildings have inventory and the inventory lists are Word files. I would like to LINK these Word files to Access. I have a form that displays the buildings information and I would like perhaps a command button that would call up the inventory file IF it exists. I have inserted the correct path and file in the table for the buildings that have inventory files. But so far I have not been able to figure out how to best handle the linking. I tried following Help by creating a bound object frame and inserting the file on the appropriate record, but the control shows for every record. I've tried creating a text box with the control source being the inventory field, but I don't know how to use the text box to call up the file ?? I'm missing something here and any help would be appreciated--thanks!

jgarnick
jgarnick@aol.com

 
This is a way you can do this without programming. For the inventory field, create an OLE object data type. I'm assuming for each building, you have designated a building number. In datasheet view, right-click the field per building number that has a Word inventory list. Then insert object, then insert as a file, then pick the Word inventory file that corresponds to the building number. Then when you create a form, only the inventory list for that building number would display. Personally I would create a separate table for the Inventory information since it is an OLE field. I'm not sure how many buildings you have and how many have inventories. I hope this will help you.
 
Thanks Omega, but I had already done everything you said. Each building does have a unique number. I right-clicked on the inventory OLE field in datasheet view and inserted the correct inventory file for each of the buildings that have one. But I guess my problem is getting the inventory field on my form--what type of control should I use? I don't want it to display automatically, I'd like the user to have to click a button or something if they want to see it and then have Word open up the file. So what am I missing?? Thanks!

jgarnick
jgarnick@aol.com

 
How about instead of creating an OLE data type, create a Hyperlink data type for the field? That way if they want to see the document, all they have to do is click on the link- then the document is called up in Word. I don't know how to do what you're asking in code yet, sorry.
 
Thanks Omega--that worked changing the data type to Hyperlink--it's not terribly pretty clicking on a textbox, but it will do for now. But one more question--when you click on the link, it minimizes Access when it opens Word. Is there a way to leave Access maximized, so when user closes Word, he'll be back in Access, instead of having to open it back up from the taskbar?? Thanks for your help!!

jgarnick
jgarnick@aol.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top