PDA

Click to See Complete Forum and Search --> : previewing access report


Tesita
Jun 11th, 2003, 06:42 PM
Is it possible to preview an access report on a computer if a printer is not set up on it?

I am trying to do that but keep getting error 2202 which says that the report cannot be previewed or printed because no printer is connected. I don't necessarily want to print just preview.

thanks much

WorkHorse
Jun 12th, 2003, 01:51 AM
How is a preview different from just showing the report? From VB you can show a report like this.

Const dbPathName = "C:\My Documents\db14.mdb"
Dim Acc As Object

Set Acc = CreateObject("Access.Application")
With Acc
.OpenCurrentDatabase dbPathName, False
.DoCmd.OpenReport "MyReport9", acViewPreview
.DoCmd.Maximize
.Visible = True
End With

Set Acc = Nothing