Results 1 to 6 of 6
  1. #1
    kingofthekassel's Avatar
    kingofthekassel is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2015
    Posts
    25

    Single Data Point on Chart


    I am creating a form and need to include a data chart that only has one point. I want to use the data from a query I created to populate the graph. It would be just a simple XY graph. Normally I would just pick the data point that I need and be done with it, but I have over 500 data points and more on the way. I want to organize the graphs by "FieldA" and be able to cycle through any value in "FieldA" and have the graph give me the corresponding points which are located in "FieldB" and "FieldC" respectively. Thanks for the help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    So you need to filter the graph RowSource? The RowSource can be a table, query, or sql statement. I always use an sql statement.

    SELECT FieldB, FieldC FROM tablename WHERE FieldA=[input parameter here];

    The [input parameter here] can be reference to a control on form or report.

    SELECT FieldB, FieldC FROM tablename WHERE FieldA=[textboxname];

    The WERE clause will synchronize the graph with current record on form or report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kingofthekassel's Avatar
    kingofthekassel is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2015
    Posts
    25
    Thanks a lot! It works, almost. What it is doing is actually plotting two points. The points have the Coordinates as both of their Y-components. For example, if an object in "FieldA" has coordinates (3,3) the two points on the graph will have (1,3) and (2,3). I am not sure how I should fix this.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I analyze graph issues best when I can work with data. If you want to provide db, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    kingofthekassel's Avatar
    kingofthekassel is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2015
    Posts
    25
    Ok, here is the internet safe version of the database with NTK info only.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I open your form and get a bunch of input prompts. Why? Why are fields in the form RecordSource with alias names (Expr1, Expr2, etc)? I modified to:

    SELECT Risks.*, RiskSupp.[SPO PM], RiskSupp.[SPO POC], RiskSupp.[Alt POC], RiskSupp.[NGC PM] FROM RiskSupp INNER JOIN Risks ON RiskSupp.[RiskNo] = Risks.RiskNo;

    Change the graph RowSource to:

    SELECT [FirstConsequence], [First Probability] FROM FinalRiskQuery Where RiskNo = RiskNo;

    The first field is the x-axis, other fields are y-axis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-06-2015, 12:08 PM
  2. Replies: 6
    Last Post: 10-20-2014, 05:43 PM
  3. Graph (Chart) - Set Color of Data Point with VBA
    By June7 in forum Programming
    Replies: 6
    Last Post: 10-18-2012, 03:14 PM
  4. Replies: 5
    Last Post: 05-14-2012, 02:01 PM
  5. Replies: 1
    Last Post: 08-04-2010, 04:38 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums