T
TrussworksLeo
Hello,
I am having problems getting access to print using late binding. I am
specially
having problems with this line and the ObjectType property
oAccess.DoCmd.SelectObject(ObjectType:=oAccess.AcObjectType.acReport,
ObjectName:=Report, InDatabaseWindow:=True)
How do I tell it to use a access report with late binding?
Here is all the code:
Dim sDBPath As String 'path to Reports.Adp
Dim oAccess As Object
'oAccess = CreateObject("Access.Application")
' The path to Reports.Adp:
sDBPath = "C:\Alpine\Ais\Reports.adp"
' Open Reports.adp in shared mode:
oAccess.OpenCurrentDatabase(filepath:=sDBPath, Exclusive:=False)
' Select the report name in the database window and give focus
' to the database window:
oAccess.DoCmd.SelectObject(ObjectType:=oAccess.AcObjectType.acReport,
ObjectName:=Report, InDatabaseWindow:=True)
oAccess.DoCmd.OpenReport(ReportName:=Report,
View:=oAccess.AcView.acViewNormal)
Thank You, Leo
I am having problems getting access to print using late binding. I am
specially
having problems with this line and the ObjectType property
oAccess.DoCmd.SelectObject(ObjectType:=oAccess.AcObjectType.acReport,
ObjectName:=Report, InDatabaseWindow:=True)
How do I tell it to use a access report with late binding?
Here is all the code:
Dim sDBPath As String 'path to Reports.Adp
Dim oAccess As Object
'oAccess = CreateObject("Access.Application")
' The path to Reports.Adp:
sDBPath = "C:\Alpine\Ais\Reports.adp"
' Open Reports.adp in shared mode:
oAccess.OpenCurrentDatabase(filepath:=sDBPath, Exclusive:=False)
' Select the report name in the database window and give focus
' to the database window:
oAccess.DoCmd.SelectObject(ObjectType:=oAccess.AcObjectType.acReport,
ObjectName:=Report, InDatabaseWindow:=True)
oAccess.DoCmd.OpenReport(ReportName:=Report,
View:=oAccess.AcView.acViewNormal)
Thank You, Leo