Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening Access report from VB6 code (Win2K / A2K SR1 / VB6 SP5)

    Using a VB app, does anyone know how to open a report inside an access file? I am adding this function to a working VB app (the app already opens the Access file in question). I have created a new report and need to access this report from the app.

    Thanks,
    Mark Santos

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Opening Access report from VB6 code (Win2K / A2K SR1 / VB6 SP5)

    I'm not quite sure what you're asking. If you're trying to run the Access report rather than using a DataLink to connect to the same datasource for a VB report, then the only way I can think of is through automation. You can't run an Access report directly from VB that I know of, you have to actually run it from the Access database.
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening Access report from VB6 code (Win2K / A2K SR1 / VB6 SP5)

    I understand that it is not be possible to open an Access report from a VB app without opening Access. But I should be able to open Access and run the report using VB code, correct? What I am trying to do on this one is get rid of a "Crystal Reports" driven paper report in the app. Access's report tool is so much better.

    Then again, I haven't given any thought to using strictly VB for this function. How is VB at generating printed paper reports?

    Thanks,
    Mark Santos

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Opening Access report from VB6 code (Win2K / A2K SR1 / VB6 SP5)

    I'm prejudiced. VB reports don't have most of the features of Access reports, like subreports and calculated fields in headers and footers, so I haven't bothered to mess with them.

    Yes, you should be able to open an instance of the Access application from VB using automation, since Access 2000 acts as an automation server. Take a look at MSKB article <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/q210/1/11.asp>ACC2000: Using Microsoft Access as an Automation Server [Q210111]</A>.
    Charlotte

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening Access report from VB6 code (Win2K / A2K SR1 / VB6 SP5)

    Thanks! I'll give it a try. I really want to get rid of the crystal reports driver and report. It is a pain to do page layout in that software (it's not really designed for that).

    Thanks,
    Mark Santos

Posting Permissions

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