Using MS Access/OLE Object


I add "OLE Object" data type field in one table. And giving user to attach the related documents against that record through simple Form.
At present user have to "Right-Click" on that field and manually and select "Insert Object" option then "Create from File" Then click to Browse and Select the document to attach.

For View the same (saved) Document against that record. User just double click on that object (field) it will open the saved (Embedded) document.  But If there is no attachment Embedded a message appear "The OLE Object is empty".

Instead of all these I want to give user everything on single click. For that I create a command button on form (Because On Button I can paste a Image look like a customize icon instead of OLE Image). Through that button click directly open the small browse window to select the document {by-default last viewed/open directory path}. In addition, I want to give restriction to choose for document type i.e. 'PDF' file. {Only this type of file user can view / attach.}  
 If document is already attach it will open the saved document.
Code should be compatible for access v. 2000 to 2007

Hi Kundan,
There is specific code which needs to be done for this kind of a Use Case. If your database isn't confidential you can have it sent to me and I will put that small applet for you.

I had similar problems like you before, so what I did was I got rid of the OLE field cause that really bloats the database. Instead I created a separate subform which stored only links of the file which were stored in another shared location. This made my database lighter.
If you feel this can solve your problem pls have your database sent to me on and I will do the needful.

The rest is up to you.

Best regards
Manish Batola  

Using MS Access

All Answers

Answers by Expert:

Ask Experts


Manish Batola


ALL MICROSOFT ACCESS DESIGN AND Development QUESTIONS which occur in a Access Projects Lifecycle. Can offer constructive help on Designing Advanced MS-ACCESS Applications such CRM/FRM(Follow-up),HSE-Health,Safety & Environmental Applications,School Management Systems,Hotel Software, Hospital Software,Chemicals Indenting,Import/Export,MRP - Manufacturing Resource Planning, ERP - Enterprise Resource Planning, Automotive Management Systems, Business Intelligence for Oil & Gas Drilling Operations, CRM,KPI- Key Performance Indicators,HealthCare, Hospitality, Constructions, Loyalty Clubs, Call Centers, Travel & Tourism, Educational Institutions, Industrial Strength Invoicing and many more being added every year.


29+ yrs in the Software industry with 23yrs completely dedicated on more than 350 Various Microsoft Access Projects from different Industry Sector[s]. I'm using Access ever since it was born.

Worked in various multinationals catering from Aerospace, Oil & Gas etc.

-BSc - Computer Science -MSAP (Master in Software & Applications Programming) -BPRE (Business Process Re-engineering Engineer) -SQAE (Software Quality Assurance Engineer) -STIE (Software Testing & Inspection Engineer) -Project Engineer (Software Development)

Past/Present Clients
Catered to various clients in the following industries • Oil & Natural Gas (BPM/CRM/Access Development) • Sales / Marketing (CRM) • Automotive (Automobile Dealers) • Logistics & Indenters (Import/Export) • HealthCare / Hospitals • Hotels 3* & 5* • Restaurants • Construction Co’s (Project Billing) • Clubs (Concept Selling) • Shoe-Chains • Solicitors/Lawyers • Call Centers • Aerospace (Preventive Maintenance) • Travel & Tourism • Computer Vendors • Manufacturing • Music Shops • Education • Data Warehousing • Health,Safety & Environmental Applications • Mud Engineering • School Management Software

©2016 All rights reserved.