Results 1 to 5 of 5

Thread: Access Reports from VB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    96
    I have a program that puts information into an Access Database. I have a few reports set up on the information.

    What I want to know is:

    How can I run the reports from VB? I want to provide the user with a list of available reports and they select one.

    Any help is greatfully appreciated.

    H.
    Just trying to muddle through...

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    Do a search on this topic or for topics related to my user name because I have answered this question before

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    96
    Thanks
    Just trying to muddle through...

  4. #4
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    I just checked your profile and realised that you were a Scot and felt really bad for not helping out a fellow Celt so here is the code below that shows a print preview of the Catalog report from Northwind.



    Set a reference to Microsoft Access object library

    Private Sub Command1_Click()
    Dim a As Access.Application

    Set a = CreateObject("Access.Application")
    a.OpenCurrentDatabase App.Path & "\NWind.mdb"
    a.Visible = True
    a.DoCmd.OpenReport "Catalog", acViewPreview
    a.DoCmd.Maximize

    End Sub


  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    96
    Thanks Again - It really helped me out

    H.

    Just trying to muddle through...

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