CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2000
    Location
    CT
    Posts
    2

    Previewing an Access 2000 report

    I am trying to preview a report created in Access 2000 in VB6.0 code. I can print it, but it will not preview.




  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Previewing an Access 2000 report

    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.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Feb 2000
    Location
    CT
    Posts
    2

    Re: Previewing an Access 2000 report

    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



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

Featured