Tyfos,
The simlest way ...
Im assuming you have a bound OLE frame on your form called "OLEbound1".
On your form create a command button with the wizzard turned off.
Open the properties sheet for the button. Use the ... button to create a macro for the On Click event of the button. The macro will include the following actions:
Action Argument
GoToControl OLEbound1
RunCommand InsertObject
In the properties for the OLE frame you want the following properties set:
Enabled: Yes
Locked: No
Auto Activate: DoubleClick
You probably want to set the display type, update options and OLE Type Allowed properties also.
You may want to link rather than embed. Just food for thought, in either case the solution is the same. But remember, embedding a file will place file data dirrectly in your database. Linking to a file will go out and look at the file wherever it resides. If the files will be deleted, you need to embed them. If the files stay on the network or local drive you may want to link them. You need to decide based on your application.
If you set the properties as above, to open the document in word, you should just have to double click the OLE frame.
You can also accomplish the same as above in VBA using the acolecreatelink or oleinsertobjdialog(Youll need to double check that in help).
If you really need a button to open the doc as opposed to double clicking.
For further info and possible ideas, check the on line help regarding the PLE object properties such as "verb".
Hope this helps. [sig]<p>Dave<br><a href=mailto:gallagherd@earthlink.net>gallagherd@earthlink.net</a><br>[/sig]