VBApprentice
Programmer
I am having a problem viewing a Access (2000) report in VB6.
I want to be able to view the report before printing it.
The code to print works fine but when I put in the constant
to view the report nothing happens. Is there something that is wrong
or missing with this code? This occurrs on a 95, ME and NT machine.
The code:
Dim appAccess As Object
Set appAccess = CreateObject("Access.Application"
appAccess.OpenCurrentDatabase (C:\test\test.mdb)
'********************************************************
'Access constants
'acNormal - Print (default)
'acPreview - Print Preview
'acDesign - Design Edit Mode
'********************************************************
appAccess.DoCmd.OpenReport "TestReport", acNormal
appAccess.Quit ' not used for acPreview
Set appAccess = Nothing
I want to be able to view the report before printing it.
The code to print works fine but when I put in the constant
to view the report nothing happens. Is there something that is wrong
or missing with this code? This occurrs on a 95, ME and NT machine.
The code:
Dim appAccess As Object
Set appAccess = CreateObject("Access.Application"
appAccess.OpenCurrentDatabase (C:\test\test.mdb)
'********************************************************
'Access constants
'acNormal - Print (default)
'acPreview - Print Preview
'acDesign - Design Edit Mode
'********************************************************
appAccess.DoCmd.OpenReport "TestReport", acNormal
appAccess.Quit ' not used for acPreview
Set appAccess = Nothing