P
Print report of MS Access 2003 & VB.NET
Do you know that why I have posted this in here? I used the VS 2005
Professional to build a Khmer Unicode Application of Restaurant Management
System and I have a problem with interval space as the print dialog control
to execute the print dialog box. And the next step, I built reports in Ms
Access 2003, then using the VB.NET 2005 to execute the report, but I have
some problem that I do not want the Access Application to open when I print.
Here is the followong code:
with adding the reference of MS Object 11.0 Library, then
Imports Access = Microsoft.Office.Interop.Access
Public Class Form1
Dim oAccess As Access.Application
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
oAccess = New Access.ApplicationClass()
oAccess.OpenCurrentDatabase(filepath:="C:\Test Access\Test
AccessReport\Northwind.mdb", Exclusive:=False)
oAccess.DoCmd.SelectObject(ObjectType:=Access.AcObjectType.acReport,
ObjectName:="Catalog", InDatabaseWindow:=True)
oAccess.DoCmd.PrintOut(PrintRange:=Access.AcPrintRange.acSelection,
Copies:=1, CollateCopies:=False)
oAccess.Quit()
End Sub
End Class
But with the above code, I d o not want to execute like this. I want just
print out the report directly without openning the access application. Can
you help me?
Thank you and best regards,
*********************************************************************
Chieng Sisovin
Vice Director
S E K Technologies Co., Ltd.
Address: 045, Dak Po Village, Slakram Commune
Siem Reap District, Siem Reap Province
Tel: (855) 63 761-242
(855) 12 534-544
E-mail: (e-mail address removed)
(e-mail address removed)
Website: www.angkor2day.com
*********************************************************************
Professional to build a Khmer Unicode Application of Restaurant Management
System and I have a problem with interval space as the print dialog control
to execute the print dialog box. And the next step, I built reports in Ms
Access 2003, then using the VB.NET 2005 to execute the report, but I have
some problem that I do not want the Access Application to open when I print.
Here is the followong code:
with adding the reference of MS Object 11.0 Library, then
Imports Access = Microsoft.Office.Interop.Access
Public Class Form1
Dim oAccess As Access.Application
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
oAccess = New Access.ApplicationClass()
oAccess.OpenCurrentDatabase(filepath:="C:\Test Access\Test
AccessReport\Northwind.mdb", Exclusive:=False)
oAccess.DoCmd.SelectObject(ObjectType:=Access.AcObjectType.acReport,
ObjectName:="Catalog", InDatabaseWindow:=True)
oAccess.DoCmd.PrintOut(PrintRange:=Access.AcPrintRange.acSelection,
Copies:=1, CollateCopies:=False)
oAccess.Quit()
End Sub
End Class
But with the above code, I d o not want to execute like this. I want just
print out the report directly without openning the access application. Can
you help me?
Thank you and best regards,
*********************************************************************
Chieng Sisovin
Vice Director
S E K Technologies Co., Ltd.
Address: 045, Dak Po Village, Slakram Commune
Siem Reap District, Siem Reap Province
Tel: (855) 63 761-242
(855) 12 534-544
E-mail: (e-mail address removed)
(e-mail address removed)
Website: www.angkor2day.com
*********************************************************************