How do I open a report in a encrypted Access database from Visual Basic?
Because reports are not part of DAO, you must use automation to open a report. This will start an instance of Access. Dim lngReturn As Long Dim objAccess As Access.Application lngReturn = Shell(“C:\MSACCESS.EXE ” _ & “/wrkgrp c:\MyMDW.mdw /User username /Pwd password /Nostartup”) DoEvents Set objAccess = GetObject(, “Access.Application”) objAccess.OpenCurrentDatabase “c:\MyMDB.mdb”, False objAccess.DoCmd.