You are currently offline, waiting for your internet to reconnect

ACC: How to Order Data in a Graph

This article was previously published under Q99934
This article has been archived. It is offered "as is" and will no longer be updated.
Moderate: Requires basic macro, coding, and interoperability skills.
This article shows you how to order data in a graph by changing the graph'sRowSource property to a query name rather than by using the SQL statementthat Microsoft Access generates.
The following steps demonstrate how to create a graph that will show allthe orders after 12/31/94, in descending order, in the Orders table in thesample database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0):
  1. Open the sample database Northwind.mdb.
  2. Create the following new query based on the Orders table, and save the query as GraphQuery:
          Query: GraphQuery      ------------------------      Type: Select Query      Field: ShipName         Table: Orders         Show: True      Field: OrderDate         Table: Orders         Sort: Descending         Show: True         Criteria: > #12/31/94#						

    NOTE: In Microsoft Access 1.x and 2.0, there is a space in the Ship Name and the Order Date field names.
  3. Use the ChartWizard to create a new form based on GraphQuery. Select both fields for the graph and click Finish.
  4. Switch to Form view. Note that the orders are sorted by the Ship Name field.
  5. View the form in Design view. Select the graph. If it is not displayed, click Properties on the View menu to show the property sheet.
  6. Change the RowSource property of the object frame as follows:
          Object: Object Frame      -----------------------------      ControlName: Embedded0         RowSourceType: Table/Query         RowSource: GraphQuery						
  7. Switch to Form view. Note that the orders are now sorted in descending OrderDate order.
For more information about Microsoft Graph properties search the HelpIndex for "charts," and then "Chart Control Properties" or ask theMicrosoft Access 97 Office Assistant.
queries graph wizards

Article ID: 99934 - Last Review: 10/22/2013 20:20:59 - Revision: 3.1

Microsoft Access 1.0 Standard Edition, Microsoft Access 1.1 Standard Edition, Microsoft Access 2.0 Standard Edition, Microsoft Access 95 Standard Edition, Microsoft Access 97 Standard Edition

  • kbnosurvey kbarchive kbhowto KB99934