Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Location
    Edmonton, Alberta
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Chart (2003)

    Is it possible to take a record count from 4 queries and create a Chart Report?
    Thank you in advance.

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    Thanks
    0
    Thanked 23 Times in 23 Posts

    Re: Access Chart (2003)

    You could do this in VBA code by opening a recordset for each query and do a movelast then a rst.Recordset.Count where rst is the recordset.

    You could put the results in a table and chart that.

  4. #3
    Star Lounger
    Join Date
    Sep 2002
    Location
    Edmonton, Alberta
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Chart (2003)

    I have no idea how to do that. If you have any examples that would help.
    Thanks again

  5. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,537
    Thanks
    0
    Thanked 23 Times in 23 Posts

    Re: Access Chart (2003)

    Assume that we have a temporary table called tblTempChart which has at least 1 field called RecCount, you will have to create another field to identify yhe queery i question.
    The loop in VBA would be something like:
    Dim rs as DAO.Recordset
    Set rs = CurrentDb.OpenRecordset("1st query name")
    rs.movelast
    iCount = rs.RecordCount
    ' write a record to the teporary table using an INSERT

    Set rs = CurrentDb.OpenRecordset("2nd query name")
    rs.movelast
    iCount = rs.RecordCount
    ' write a record to the teporary table using an INSERT

    Set rs = CurrentDb.OpenRecordset("3rd query name")
    rs.movelast
    iCount = rs.RecordCount
    ' write a record to the teporary table using an INSERT

    Set rs = CurrentDb.OpenRecordset("4th query name")
    rs.movelast
    iCount = rs.RecordCount
    ' write a record to the teporary table using an INSERT

  6. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Access Chart (2003)

    You could create 4 separate counting queries, then a fifth query that combines these 4 queries together.
    Base the chart on the fifth query.
    Regards
    John



Posting Permissions

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