Page 5 of 9 FirstFirst 123456789 LastLast
Results 61 to 75 of 132
  1. #61
    Sonny101 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jun 2014
    Posts
    79
    Yup looked at the file, looks pretty neat. Was something done in the RowSource sql to make it something like this or was it some sort of vba code? Could that somehow be replicated to suit my graph, by changing certain values (cycle time, total entries to show etc), while retaining the code that 'rolls' the week/month?

  2. #62
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    The VBA is to import data from spreadsheets and to open/close objects and to print report.

    All data manipulation after import is accomplished with queries and calculations in queries and on form or report.

    Certainly the concepts can be adapted for other time periods.

    As for graphing the 'rolling' data, can't answer that. Might involve lots of VBA code and a 'temp' table. I have no interest to find out.
    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. #63
    Sonny101 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jun 2014
    Posts
    79
    Oh ok then some way to show a general trend for a certain category, as to see whether total hours put into that category are increasing or decreasing. Maybe some sort of list that displays month in one column and the manhours for that category in other, and then overtime an entry gets added to that list (not necessarily removing the last one to only keep a certain amount of months, hence not really 'rolling'), then a button on the side which plots the last 6 or 12, or whatever amounts of time periods. Just need some way of showing the trend, nothing fancy.

  4. #64
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Trend - sounds like a line graph.
    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. #65
    Sonny101 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jun 2014
    Posts
    79
    Ok I get it. Maybe lets leave out the graphing part but just some query that adds up the hours from the category every month, and displays that number in front of its respective date, hence it would be a long list of months with their hours. Something like

    MONTH HOURS (TROUBLESHOOTING)
    July 2014 25
    June 2014 28
    May 2014 15
    Apr 2014 12
    Mar 2014 20
    Feb 2014 15


    PS How do you add a table to a post?

  6. #66
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    SELECT Category, Format([datefield], "yyyymmm"), Sum([Hrs]) As SumHrs FROM query GROUP BY Category, Format([datefield], "yyyymmm");

    Can copy/paste rows from an Access table into editor. It will be an image, not an editable table (you appear to have done this).

    Click Go Advanced button below Quick Reply window for more editing tools, including table builder.
    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.

  7. #67
    Sonny101 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jun 2014
    Posts
    79
    Yeah sorry about that I am a bit tired, I have am exam tomorrow, and also have to work on this project for office.
    So wait this would be a report right? And pasted into RowSource sql? because what I did with the piecharts was, make a random piechart from the wizard, then paste the code for that in the RowSource sql. Where do I go about for this one?

  8. #68
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Didn't you ask for an SQL that would summarize hours by a date and category? I did not include a filter clause.

    I feel this thread has gone on long enough. I think you have enough examples you can use as guidelines to generate variety of graphs. Just keep experimenting and getting more familiar with the SQL manipulation.
    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.

  9. #69
    Sonny101 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jun 2014
    Posts
    79
    Yeah I know I promise this will be the last I don't understand where to write the code for something other than PieCharts, as like I said with piecharts it was simple enough that you can use query/table for data and then use a piechart/bar-graph and modify its RowSource sql to customize the graph as to your liking, but I dont know much about reports which display a table, with date as one column and Sum of Hours for a category as other. I tried using Reports>"Create a report in design view", And wizard to make a default Table, then modify its RowSource sql to write the code you told me to but could not find the sql there.

    PS You can make a killer guide on graphing with all your posts on this thread, with various examples

    PSS Or how about a graph which doesnt "roll" and Sums the hours on y-axis which on x-axis it categorizes the time in months for all the database. Maybe after 1 year someone could backup the year old data and delete it to make room for the data for next year, hence it would be a bit manual but would display the trend for that year

  10. #70
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    I am not sure what you mean by 'display a table' and 'default Table'.

    Reports have a RecordSource property. That's where SQL statement goes.
    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.

  11. #71
    Sonny101 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jun 2014
    Posts
    79
    Sorry to bring this up again but if I type the following code I get hit by a bunch of popups asking me the value of 'datefield', 'ID', 'Tech', 'Date', 'Crew', 'Shift', 'Shfit', 'Category', 'Hrs' etc and in the end a blank table with columns on ID, Tech, Date and Crew:


    SELECT Category2, Format([datefield], "yyyymmm"), Sum([Hrs]) As SumHrs FROM UnionT1 GROUP BY Category2, Format([datefield], "yyyymmm");

    Kinda feel bad for asking you again, but any idea what goes wrong here?

  12. #72
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Is datefield the actual name of the field?

    Where are you inputting this statement - graph RowSource?

    I don't know why the other popups are triggered - perhaps has something to do with the report RecordSource.
    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.

  13. #73
    Sonny101 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jun 2014
    Posts
    79
    Nope inputting this in the RecordSource (see pic below), however if I change the

    SELECT Category2, Format([datefield], "yyyymmm"), Sum([Hrs]) As SumHrs FROM UnionT1 GROUP BY Category2, Format([datefield], "yyyymmm");

    to

    SELECT Category2, Format([Date], "yyyymmm"), Sum([Hrs]) As SumHrs FROM UnionT1 GROUP BY Category2, Format([Date], "yyyymmm");

    (Date is the actual field name), nothing much changes


    Attached Thumbnails Attached Thumbnails Capture.jpg   Capture2.jpg  

  14. #74
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    The report has textboxes bound to fields that are not included in the RecordSource. That will cause the popups.

    Date is a reserved word. Should avoid using reserved words as names.
    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.

  15. #75
    Sonny101 is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jun 2014
    Posts
    79
    So even if I remove all those textboxes leaving behind only Category2, Date and Hrs (SELECT Category2, Format([Date], "yyyymmm"), Sum([Hrs]) As SumHrs FROM UnionT1 GROUP BY Category2, Format([Date], "yyyymmm"), only the 'Hrs' pops up, while the table that follows is still blank. As for the Date, I know now that it is a reserved word, but when I first started making the table I didn't, so now I am stuck with using 'Date'

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

Similar Threads

  1. Graph on Form - Overriding data
    By Gabriel2012 in forum Forms
    Replies: 6
    Last Post: 02-19-2013, 10:18 AM
  2. Replies: 6
    Last Post: 02-29-2012, 03:13 AM
  3. How to program a GRAPH out of data from TABLE
    By taimysho0 in forum Programming
    Replies: 7
    Last Post: 02-15-2012, 04:09 PM
  4. Replies: 3
    Last Post: 01-10-2011, 10:31 AM
  5. Graph totals queries with different data
    By maggioant in forum Queries
    Replies: 0
    Last Post: 10-01-2009, 12:12 PM

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