Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2006
    Posts
    43

    Unanswered: number of report

    I am using access 97. Is there a way to get number of report instead of manually count it one by one? Thanks.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yup.

    MsgBox "There are " & CurrentDb.Containers!Reports.Documents.Count & " reports."

    Put that into any VBA code or the debug window.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Nov 2006
    Posts
    43
    Thanks. How about all the names of the report?

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Code:
    Dim i As Integer
    
    For i = 0 To CurrentDb.Containers("Reports").Documents.Count - 1
        Debug.Print CurrentDb.Containers("Reports").Documents(i).Name
    Next i
    George
    Home | Blog

Posting Permissions

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