E
Ebassador
VS 2008 with Office 2007. Using .Net 3.5 and interop services.
When oAccess.Run is executed, error results as shown above.
Here is the code:
Friend Function doReport(ByVal rName As String,
Optional ByVal sView As Access.AcView = Nothing, _
Optional ByVal sFilter As String = "", _
Optional ByVal sWhere As String = "") As Boolean
Dim oAccess As Access.Application = CreateObject("Access.Application")
oAccess.Visible = False
oAccess.OpenCurrentDatabase(getConfigVar("dbLocation", True, True))
oAccess.DoCmd.Minimize()
oAccess.Visible = True
oAccess.Run("OpenAccRpt", rName, sView, sFilter, sWhere & " ")
oAccess.DoCmd.Maximize()
doReport = True
End Function
When oAccess.Run is executed, error results as shown above.
Here is the code:
Friend Function doReport(ByVal rName As String,
Optional ByVal sView As Access.AcView = Nothing, _
Optional ByVal sFilter As String = "", _
Optional ByVal sWhere As String = "") As Boolean
Dim oAccess As Access.Application = CreateObject("Access.Application")
oAccess.Visible = False
oAccess.OpenCurrentDatabase(getConfigVar("dbLocation", True, True))
oAccess.DoCmd.Minimize()
oAccess.Visible = True
oAccess.Run("OpenAccRpt", rName, sView, sFilter, sWhere & " ")
oAccess.DoCmd.Maximize()
doReport = True
End Function