• Access Chart (2003)

    • This topic has 4 replies, 3 voices, and was last updated 17 years ago.
    Author
    Topic
    #451006

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

    Viewing 1 reply thread
    Author
    Replies
    • #1109281

      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.

      • #1109285

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

        • #1109287

          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

    • #1109292

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

    Viewing 1 reply thread
    Reply To: Access Chart (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: