Results 1 to 3 of 3

Thread: to call access2000 reports thro VB6 appliation..pls its bit urgent

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Location
    Ohio, dayton
    Posts
    2

    Unhappy

    Is it possible to access reports from access2000 to VB6 applications. I am trying to call the reports i have in my access 2000 database thro my vb application. I don't wanna use the crystal rpt or the data environment in my project. This is urgent request ..can any one help me /....
    Only way to increase knowledge is by sharing

  2. #2
    New Member
    Join Date
    Nov 2000
    Location
    Singapore
    Posts
    1

    Smile

    My friend had posted this question before. We got reply with codes below. Try it, it should work :

    'From the book Database Access With VB6
    'by Jeffery Mcmanus..
    'you need your access ref obj lib

    Dim MSACCESS as Access.application

    Private Sub PrintReport_Click()

    Set MSACCESS = New Access.Application

    MSACCESS.OpenCurrentDatabase("c:\your dir\Your.mdb")
    'This opens your db...

    MSACCESS.DoCmd.OpenReport "YourReportHere", acViewNormal
    'This actually opens your report from your Access
    'db & print it..

    End Sub

    MSACCESS.CloseCurrentDatabase

    Set MSACCESS = Nothing
    'You need this,
    'or you will keep access in memory & lag the user...

  3. #3
    Addicted Member
    Join Date
    Apr 1999
    Location
    Freeport
    Posts
    204

    MSAccess

    I was able to get vb to run report but I need to know the dll and exe file for setup. I using Access97

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