Article ID: 138911
Article Last Modified on 1/19/2007
182568 ACC97: Microsoft Access 97 Sample Queries Available in Download Center
Field: AYear: DatePart("yyyy",[OrderDate]) Total: Group By Sort: Ascending Show: Yes
Field: AMonth: DatePart("m",[OrderDate]) Total: Group By Sort: Ascending Show: Yes
Field: RunTot: DSum("Freight","Orders","DatePart('m', _ [OrderDate])<=" & [AMonth] & " And DatePart('yyyy', _ [OrderDate])<=" & [AYear] & "") Total: Expression Show: Yes
Field: FDate: Format([OrderDate],"mmm") Total: Group By Sort: Ascending Show: Yes
Field: DatePart("yyyy",[OrderDate]) Total: Where Criteria: 1994 Show: No
Ayear Amonth RunTot Fdate
-------------------------------------
1994 8 1288.18 Aug
1994 9 2685.35 Sep
1994 10 3808.83 Oct
1994 11 5219.05 Nov
1994 12 7481.28 Dec
Ayear Amonth RunTot Fdate
-------------------------------------
1994 1 1936.65 Jan
1994 2 3452.52 Feb
1994 3 5479.33 Mar
1994 4 8607.74 Apr
1994 5 12094.67 May
1994 6 13859.39 Jun
1994 7 17729 Jul
1994 8 21992.58 Aug
1994 9 27477.79 Sep
1994 10 31767.05 Oct
1994 11 36681.15 Nov
1994 12 42894.37 Dec
Field: EmpAlias: EmployeeID Total: Group By Show: Yes
Field: Freight Total: Sum Show: Yes
Field: RunTot: Format(DSum("Freight","Orders","[EmployeeID]<=" _ & [EmpAlias] & ""),"$0,000.00") Total: Expression Show: Yes
Employee SumOfFreight RunTot
---------------------------------------------
Davolio, Nancy $8,836.64 $8,836.64
Fuller, Andrew $8,696.41 $17,533.05
Leverling,Janet $10,884.74 $28,417.79
Peacock, Margaret $11,346.14 $39,763.93
Buchanan, Steven $3,918.71 $43,682.64
Suyama, Michael $3,780.47 $47,463.11
King, Robert $6,665.44 $54,128.55
Callahan, Laura $7,487.88 $61,616.43
Dodsworth, Anne $3,326.26 $64,942.69
ARTICLE-ID: 132134 ACC2: How to Create Running Totals in a Query
Keywords: kbhowto kbusage KB138911