Rob Brown
Oct 30th, 2000, 08:53 AM
Hi,
I'm using the following code in VB5 to open an Access 97 report(acPreview).
I'm then immediately using the OutputTo method from Access to create an HTML page from the report.
Does anyone know how I can stop Access opening in it's own window?
'Declare the variable
Dim appAccess As Access.Application
'Create a new access application
Set appAccess = New Access.Application
'Open the database
appAccess.OpenCurrentDatabase _
"G:\Wiz Add Ins\Energy Client\Database\Energy Client.mdb"
'Open the report
appAccess.DoCmd.OpenReport "rptStatement", _ acViewPreview, , "[Date] = #" & datReportDate & "#"
'Output the statement report to an HTML file
appAccess.DoCmd.OutputTo acOutputReport, "rptStatement", _ acFormatHTML, _
"G:\Wiz Add Ins\Energy Client\HTM\Statement.Htm"
'Close access
appAccess.Quit
Any suggestions would be greatly appreciated,
Best regards,
Rob Brown.
I'm using the following code in VB5 to open an Access 97 report(acPreview).
I'm then immediately using the OutputTo method from Access to create an HTML page from the report.
Does anyone know how I can stop Access opening in it's own window?
'Declare the variable
Dim appAccess As Access.Application
'Create a new access application
Set appAccess = New Access.Application
'Open the database
appAccess.OpenCurrentDatabase _
"G:\Wiz Add Ins\Energy Client\Database\Energy Client.mdb"
'Open the report
appAccess.DoCmd.OpenReport "rptStatement", _ acViewPreview, , "[Date] = #" & datReportDate & "#"
'Output the statement report to an HTML file
appAccess.DoCmd.OutputTo acOutputReport, "rptStatement", _ acFormatHTML, _
"G:\Wiz Add Ins\Energy Client\HTM\Statement.Htm"
'Close access
appAccess.Quit
Any suggestions would be greatly appreciated,
Best regards,
Rob Brown.