Results 1 to 2 of 2

Thread: Data Report in VB6

  1. #1
    Guest

    Red face

    Hello!
    Can I set a data report in a landscapt format during design time. I have a lot of information (fields) needed to show on my data report and I must set it to landscapt in order to fit all data into one page. Any idea?? Thanks!
    If there isn't a way to do so, the alternative is to create the report in Access first, however is this possible to do (call the Access report from VB by OLE Automation)?

  2. #2
    Guest
    Try this, first reference your Access reference object library.

    Dim MSAccess as Access.application

    Private Sub PrintReport_Click()
    Set MSAccess = New Access.application

    MSAccess.OpenCurrentDatabse("c:\the dir\the .mdb") 'This opens the mdb

    MSAccess.DOCmd.OpenReport "YourReportHere",acViewNormal
    'This opens your report form Access and print it.

    MSAccess.CloseCurrentDatabse

    Set MSAccess = Nothing 'Clear memory

    End Sub

    This may need to be tweeked. Good Luck!



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