Results 1 to 3 of 3

Thread: Running Access Queries and Reports in VB

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    39

    Question

    I will shortly be starting into a project which requires me to write about 100 boring and complex accounting type reports, which would be so much easier in access than in that awful crystal reports. Is it possible to create access reports based on access queries (the database for the app is in access), and then just call and run them from VB ? Thus meaning that all the hard work is done in the access queries the reports are based on, rather than pages of SQL in VB. ?

  2. #2
    Guest
    Dim objAccess As Object
    Dim ReportNow As String
    ReportNow = "MyReport"
    Set objAccess = GetObject(App.Path & "\Data.mdb")
    With objAccess.Application
    .DoCmd.OpenReport ReportNow, acNormal
    End With
    objAccess.Quit acExit
    Set objAccess = Nothing

    This will start access and load up the report 'MyReport'

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    39

    Thumbs up

    Thanks.

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