I am trying to preview a report created in Access 2000 in VB6.0 code. I can print it, but it will not preview.
Printable View
I am trying to preview a report created in Access 2000 in VB6.0 code. I can print it, but it will not preview.
when opening the report, specify 'acPreview' as parameter for view. The default value is 'acNormal' wich just sends it to the printer.
Tom Cannaerts
[email protected]
The best way to escape a problem, is to solve it.
Thank you for your response. I have tried that and it just sits in memory. If I press CTRL ALT DEL, I can see MSAccess in the listing of programs, but I do not see the report. I have tried using the Visible command but VB tells me it is an invalid type for that object. My code follows
Dim appAccess As New Access.Application
Dim wsDataBaseLocation As String
Dim wsReportName as String
Public Sub PrintReport()
wsReportName = "RptTest"
wsDataBaseLocation = "C:\projects\2felt\databases\felt.mdb"
appAccess.OpenCurrentDatabase (wsDataBaseLocation)
appAccess.DoCmd.Maximize
appAccess.DoCmd.OpenReport wsReportName, acViewPreview