Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009

    Unanswered: Chart Axis Question

    Hi all,

    Hoping one of you experts can help me out here.

    Is it possible for a Y-axis on a graph to go from week 1 to week 52 and then start at week 1 of the next year after 52?

    Basically, I have a chart that shows workload levels (i.e. the week of the year that an engineers current task ends)

    It's not entirely useful if you can only see up until week 52 this year if their work continues to say, week 12 of 2010.

    Which also begs the question, if we are currently in week 38 and using the database I enter 12 in the work ends field, is there an equation that can read something like this:

    If work week = less than current week, then work week must mean the work week next year.

    Sorry my programming is very poor!

    I've attached a pic of the current database...
    Click image for larger version. 

Name:	db.JPG 
Views:	56 
Size:	263.9 KB 
ID:	10039

    Currently, the Row Source data is as follows...

    SELECT [Resource Name & Task],Sum([Stress]) AS [SumOfStress],Sum([Design]) AS [SumOfDesign],Sum([Quality]) AS [SumOfQuality] FROM [qry_AccessGraphData] GROUP BY [Resource Name & Task] ORDER BY Sum([qry_AccessGraphData].Week) DESC;

    And this is the VB code I've used to make the graph update to the current work week upon clicking....

    Private Sub Graph20_Click()

    Dim objChart As Object
    Dim objAxis As Object
    Set objChart = Me!Graph20.Object

    Set objAxis = objChart.Axes(2)

    objAxis.MinimumScale = Format(Date, "ww")
    objAxis.MaximumScale = 52

    End Sub

    Hope this isn't too confusing!!

    Thanks in advance,


  2. #2
    Join Date
    Dec 2004
    Madison, WI
    I may be tempted to first create (or delete and append to) a temp table that the chart is based off of versus trying to embed too much logic/formatting of fields in 1 query.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Aug 2009
    Hi, thanks for replying but I'm not sure I follow you? Are you saying I need to redesign and have more fields in a temporary table? If so, what do you suggest - I'm at a complete loss at the moment!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts