How to create a graph from my querys results?

105ben

Registered User.
Local time
Today, 04:02
Joined
Feb 2, 2013
Messages
42
Hello,

I have a query that pulls up the sum of records that holkd a date value between two dates, and groups them by the person that created them.

How can I show these results in a graph? that will update everytime a user clicks a buttons (as they may wish to change the two dates to search between)

Thanks in advance!
 
  1. Create a Form with two Textboxes and a Command Button.
  2. Change the first Textbox Name Property Value to StartDate.
  3. Change the second Textbox Name to EndDate.
  4. Change the Command Button Name to cmdGraph.
  5. Use the StartDate, EndDate Textbox references in the Criteria Row of the Query, below the Date Field as shown below:
    Code:
    BETWEEN Forms![Form Name]![StartDate] AND Forms![Form Name]![EndDate]
  6. Write the Command Button Click Event Procedure as shown below to open the Report with the Graph Chart:
Code:
Private Sub cmdGraph_Click()
Me.Refresh 'This action will update the Query with changed date on the form.
    DoCmd.OpenReport "Report Name",acViewPreview
End Sub

You must prepare the Query in such a way that the output is suitable for the Graph Chart.

Check the following links for Graph Chart Preparation Tips:
MS-Access and Graph Chart
MS-Access and Graph Charts-2
 
Last edited:

Users who are viewing this thread

Back
Top Bottom