Results 1 to 10 of 10
  1. #1
    khayward is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2017
    Location
    Oregon
    Posts
    89

    Difficulty with graphs - Access 2007

    Hi all,


    I have a couple of graphs I want in a form and I've been able to get a lot done so far but I'm really stuck with how to get the graph to do what I want.
    The form has a subform, the main part of the form is information about a part and the subform shows historical data regarding times it has been built. I used the built in graph function to add a graph to the main form and so far the graph successfully updates as the records for the main form are cycled with the data from the subform.

    The problem I am having is that the data I want to display on the graph consists of a date the product was made and the productivity, as a percentage, of that instance so I can see at a glance the history as a line rather than a bunch of data. I'd like to have a histogram too but want to focus on the line graph for now.
    The graph wants to use either the date or the percentage as the categories and so forth but what I'd like is for the y axis to be percentage 0-200% and the X axis to be date 2015 to 2017 (Or present) and the data to be plotted. Hopefully I'm making sense, but let me know what I need to provide to help clarify.

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Create a query that does what you want then set that as the record source for the chart.
    If you only want to see the years on the x axis, use something like Year(MyDateField) as a query field,
    Choose an appropriate chart type for your data
    Then once the chart has been created, click on it to enter Edit mode, click on the y axis and set the scale etc ....
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    khayward is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2017
    Location
    Oregon
    Posts
    89
    Hi,
    Thanks for the response, I will look into doing this and see how far I get. I will have to get my copy of Access 2007 for Dummies out ;-)

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Something like the attached perhaps ...?

    Click image for larger version. 

Name:	Chart2.PNG 
Views:	22 
Size:	72.3 KB 
ID:	32002
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    khayward is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2017
    Location
    Oregon
    Posts
    89

    Something like that

    That's almost exactly what I'm hoping to achieve!
    My only question at this point is that the data for the form/subform comes from a table, if I create a query to organize and sort the data from the table can the graph still be linked to the current record(s) on the form/subform?

    I'll try to post a screenshot of the form later.

    Thank you for taking the time to respond, I'm grateful for it!

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    My only question at this point is that the data for the form/subform comes from a table, if I create a query to organize and sort the data from the table can the graph still be linked to the current record(s) on the form/subform?
    Yes it can

    If it helps, you can download the app containing that chart here: http://www.mendipdatasystems.co.uk/free-apps/4592091376
    Its provided as a free download but as an ACCDE file (so code isn't accessible)
    However an ACCDB version with full code can be purchased at a very low price
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    khayward is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2017
    Location
    Oregon
    Posts
    89
    Thanks for the link and advice, here's a snap of the form I want to add the graph too:Click image for larger version. 

Name:	DB archive form.JPG 
Views:	15 
Size:	68.7 KB 
ID:	32014

  8. #8
    khayward is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2017
    Location
    Oregon
    Posts
    89
    Thanks again for the help, I succeeded this afternoon. I'm embarrassed to say that my difficulty stemmed from the fact that both fields I was trying to use for the graph were formatted as text, I fixed that and got the below result :-)

    Click image for larger version. 

Name:	Succesful graph cature.JPG 
Views:	15 
Size:	93.5 KB 
ID:	32026

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Glad you got it working
    Any idea why not all points are linked on your chart?
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  10. #10
    khayward is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Apr 2017
    Location
    Oregon
    Posts
    89

    Follow up and gaps in chart

    Quote Originally Posted by ridders52 View Post
    Glad you got it working
    Any idea why not all points are linked on your chart?
    Hi,
    Sorry for the delayed response. The chart is pulling data from an imported spreadsheet that documents work orders, it hasn't been very consistently kept over the years which is a part of why I'm playing with the database. In the spreadsheet rows are supposed to be copied/pasted from master rows and only specific data entered but may times, due to the tyranny of the immediate, that doesn't happen with any regularity. The gaps are where the entry in the 'Yield %' field are blank.

    I did find a glitch of sorts that I'm waiting for more data to prove out - my core data stops last summer and when I add data for dates outside the core data date range the chart doesn't give it a label/category and just plots in in a blank spot on the left. I think it needs more data to assign the date range category to the new data.

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

Similar Threads

  1. graphs in access
    By chr1stoper1 in forum Access
    Replies: 1
    Last Post: 08-17-2015, 07:18 AM
  2. Replies: 5
    Last Post: 06-05-2015, 10:00 AM
  3. VBA in Access or Export to Excel for Graphs
    By octsim in forum Programming
    Replies: 5
    Last Post: 11-04-2013, 10:56 AM
  4. Replies: 2
    Last Post: 06-18-2011, 09:55 AM
  5. Having difficulty with Date use
    By tamtheram in forum Forms
    Replies: 2
    Last Post: 04-19-2011, 07:26 AM

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