Using MS Access/Error # 7802


Dear Mr. Batola
I am calling this module to print report after the user select the output device either printer or screen. The following code working fine when  the frontend file extension is ACCDB. But giving ERROR 7802 under the ACCDE extension. What is wrong  in my code or should I tick any library at VBA  preference. I am usingACCESS 2007 .
Best Regards
Public Function RunReport(RepName As String, OutDvic As Integer)
On Error GoTo Err_RunReport
If OutDvic = 1 Then
   DoCmd.OpenReport RepName, acViewNormal, "", "", , acNormal
   DoCmd.OpenReport RepName, acViewLayout, "", "", , acNormal
End If
Exit Function
MsgBox "Error: " & Err.Description & "(" & Err.Number & ")"
Resume Exit_RunReport
End Function

Reference Libraries
Reference Libraries  
Good day Nagy,

Please have the below reference libraries included for your Access 2007 version

1.Visual Basic for Applications
2.Microsoft Access 12.0 Object Library
3.Microsoft Office 12.0 Access Database Engine
4.Microsoft ActiveX Data Objects (Multi-Dimentional 2.0)or anyone that matches Access 2007

Pls check the attachment for more references, but I don't think those should matter in your case.

This should resolve your issue.

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.