By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,871 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,871 IT Pros & Developers. It's quick & easy.

SImple Query question

P: 12
I have a question .
I have a Chart which i run from a query. The chart has 3 fields
Line , Date , Time in mins. The purpose of the chart is to display the sum of all the "time in mins" in a given "line" for a week( from date to date).
In the query i am trying to sum all the "time in mins" for a given line and display it as a sum. How should i do that?The query should also have the date, sum of time in mins for a given line. This info needs to be on a chart .
This is probably a easy question but i dont know how to go about it.
Thanks.
Oct 26 '06 #1
Share this Question
Share on Google+
5 Replies


NeoPa
Expert Mod 15k+
P: 31,470
I've never come across Charts in Access before.
In a report, though, textBoxes have a 'Running Sum' property which can be used to maintain a running total of records so far. Alternatively, you could have a TextBox in the Footer section which ontains "=Sum([Field])" in its Control Source property.
Oct 26 '06 #2

P: 12
is there a running sum in a query?
I need to sum all the Time in mins in a given line. So i need to group by line and then sum all time in mins in a line so when i run the query it shows the line i typed in a query and the sum of all time in mins of that particular line which is stored in different recorsd. i hope i was clear
Oct 26 '06 #3

NeoPa
Expert Mod 15k+
P: 31,470
Not very clear I'm afraid.
However, I can say that - No, there is not a running sum facility in queries. Only in objects built on them (at least there is in a report - I couldn't find anything in a form)
Oct 26 '06 #4

P: 12
I have 6 fields. They are
Date, Line, Shift, Downtime in mins, DOwntime comments and Type of downtime.
I want to write a query which will show me The accumulated downtime in mins for all the shifts in a given line for a week. Can i do this?



Not very clear I'm afraid.
However, I can say that - No, there is not a running sum facility in queries. Only in objects built on them (at least there is in a report - I couldn't find anything in a form)
Oct 26 '06 #5

NeoPa
Expert Mod 15k+
P: 31,470
Yes.

Something like :-
Expand|Select|Wrap|Line Numbers
  1. SELECT Format([Date], 'ww') AS Week, [Line], [Shift], Sum([Downtime]) AS WeeklyDowntime
  2. FROM [Table1]
  3. ORDER BY Format([Date], 'ww'), [Line], [Shift]
  4. GROUP BY Format([Date], 'ww'), [Line], [Shift];
should do you.
Oct 26 '06 #6

Post your reply

Sign in to post your reply or Sign up for a free account.