Results 1 to 2 of 2

Thread: previewing access report

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    225

    previewing access report

    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

  2. #2
    Fanatic Member WorkHorse's Avatar
    Join Date
    Jul 2002
    Location
    Where you live.
    Posts
    591
    How is a preview different from just showing the report? From VB you can show a report like this.

    VB Code:
    1. Const dbPathName = "C:\My Documents\db14.mdb"
    2. Dim Acc As Object
    3.  
    4. Set Acc = CreateObject("Access.Application")
    5.     With Acc
    6.         .OpenCurrentDatabase dbPathName, False
    7.         .DoCmd.OpenReport "MyReport9", acViewPreview
    8.         .DoCmd.Maximize
    9.         .Visible = True
    10.     End With
    11.    
    12. Set Acc = Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width