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

Add object to a table

Status
Not open for further replies.

loetje

Technical User
Jun 18, 2008
5
NL
I have tried and tried to find a function to add an OLE object to a table in a form I made for filling this table.

What I want is a button that will open a file dialog where i can select a file (linked) that will be added to a certain field in a table (this field holds OLE objects).

Can anyone help me with this?

PS. The next step of the code I'm trying to write will email a word form as an attachment (this wordform will be filled with information from a table). If there is also an OLE object in the record, this object should also be sent as an attachment....if someone has a solution for this problem that would be great.
 
Simple solution is don't!

Access isn't designed for storing binary objects, even though it has the capability to do so. SQL Server has the same capabilities but both applications cause more problems that they solve.

The best solution, both from an efficiency point of view and ease of access, is to store a link to the document/object you're trying to embed. This not only keeps your db to a manageable size, but it also minimises the 'issues', the Access has with embedded objects.
 
OK, I Will use the link. But what is the code for a command button that can enter the hyperlink in the assigned field?
 
read up on dialog boxes. The control you need, from memory is msctl32.ocx. It's part of the form design toolset. Click the more controls option in your toolbox and it's in the list. You can then create your own open/save boxes and directory lists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top