???? ID: 290136 - ????? ???????: 02 ?????? 2010 - ??????: 2.0
Microsoft Access ??? ??? ???? ??? ?????? ????? ?? ??? ???? ????
?????? ?????? This article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
?????: ?????? ???????? ??????, ?????????????? ?? multiuser ???? ???
?? ???? ?? Microsoft Access ??????? (.mdb) ????? ?? ??? ?? ???? Microsoft Access ??????? (.accdb) ????? ?? ??? ???? ???? ??????? Microsoft Access 2000 ??????? ?? ??? ?? ???? ??, ?????
208714
(http://support.microsoft.com/kb/208714/EN-US/
)
.
???? Microsoft Access 97 ?? ??????? ?? ??? ?? ????, ?????
138911
(http://support.microsoft.com/kb/138911/
)
.
?? ???? ????????? ???? ?? ?? ?? ??????? ??? ????? ????? ?? ??? ???? ??? ?????? ????? ?? ??? ?? ???? ???? ??? ???? ??? ?????? ?? ?????? ?? ??????? ???? ?? ???? ?? ????? ??????? ?? ??? summation ?? ???????? ?????? ?? ??? ??? ?????? ??? ?? ?????? ?? ?????? ????????? ???? ?? ??? ????? ??? ?????? ?? ?? ???? (?? ??? ?? ???? ?? ?? ???) ????? ?? ??????? ??? ?????? ???
???: ?? ????? ????? Qrysmp00.exe ??? ?? ???? ??? ???????? ???? ???? ????? ?? ?? ???????? ??? ???? ???? ?? ????? ????? ??????? ???? ?? ??? ???? ???? ?? ???? ??? ??????? ?? ??? ????? ????? ???? ?? Microsoft ???????? ??? ?????:
207626
(http://support.microsoft.com/kb/207626/EN-US/
)
ACC2000: ????? 2000 ????? ???????? ?????? ??????? ?????? ???
?????? 1: ???? ???? ?? ????? ????
DSum function and criteria in a query to create a running sum over time. The
DSum function sums the current record and any previous records. When the query moves to the next record, the
DSum function runs again and updates the cumulative total.
The following sample query uses the
Orders table from the sample database
Northwind to create a running sum of the freight costs for each month
in 1997. The sample data is limited to one year for performance reasons.
???????
DSum ?????? ???? ?????? ??? ???????? ?????? ?? ??? ?? (???? ?? ???? ???????? ?? ???) ?? ?? ????? ?? ???? ??? ?? ????????? ?? ?????? ???? ?? ??? ?????? ?? ??? ??? ?? ????? ?? ?? ?????? ?? ????? ?? ???, ????? ????? ?? ???? ????:
????????? ????? ??????? ?????? ???? ?? ?? ??? ???? ?????? ?????, ?? ???? ?????? ??????? ????? ????????? ???? ??,??? .???: Access 2007 ???, ????? ??????? ???????????/?????? ?? ?????????? ??? ?? ????? ????.. ?????? ?????? ????? ?? ???? ?????, ??? ????? ?????????? ??? ?????????? ????? ???, ?? ?? ??? ????? ??? ?? ??????? ,????? ???? , ???????? ?????:
Field: AYear: DatePart("yyyy",[OrderDate])
Total: Group By
Sort: Ascending
Show: Yes
??? ??????????????? ????? ????????? ???? ?? ?? ?? ???? ??? OrderDate ????? ????? ???? ???? ?????? ?????? ????? ?? ????? ?????, ??? ????? ?????????? ??? ?????????? ????? ???, ?? ?? ??? ????? ??? ?? ??????? ,????? ???? , ???????? ?????:
Field: AMonth: DatePart("m",[OrderDate])
Total: Group By
Sort: Ascending
Show: Yes
??? ??????????????? ????? ????? ???? ?? ?? ???? ?????? ????? ?? ??? ?? ??? ?? ??? ??? ?? ???????? ??? 1 ?? 12 ?? ????????? ???? ??? ?????? ?????? ????? ?? ????? ?????, ??? ????? ?????????? ??? ?????????? ????? ???, ?? ?? ??? ????? ??? ?? ??????? , ???????? ????? ???????: : ????? ?????? ???, ???? ?????? ?? ??? ??? ?? ????????? (_) ?? ???? ?? ?????? ?? ???????? ?? ??? ??? ????? ???? ???? ??? ?????? ?? ??? ?? ????????? ????? ?? ?? ?????? re-creating.
Field: RunTot: DSum("Freight","Orders","DatePart('m', _
[OrderDate])<=" & [AMonth] & " And DatePart('yyyy', _
[OrderDate])<=" & [AYear] & "")
Total: Expression
Show: Yes
??? ??????????????? ????? ?????DSum ?? AMonth ?? AYear ????? ??? ??? ?? ?? ?? ?????? ?? ??????? ???? ??? ?? ?? ??????? ??????? ?? ????? ??? Freight ????? ??? ???? ?? ??? () ???????? ?????? ?????? ????? ?? ???? ?????, ??? ????? ?????????? ??? ?????????? ????? ???, ?? ?? ??? ????? ??? ?? ??????? ,????? ???? , ???????? ?????:
Field: FDate: Format([OrderDate],"mmm")
Total: Group By
Sort: Ascending
Show: Yes
??? ??????????????? ????? ?? ????? textual ??????, ??? ???? ?? Feb, ?????, ?? ??? ??? ?? ??? ????????? ???? ??? ?????? ?????? ????? ?? ?????? ?????, ??? ????? ?????????? ??? ?????????? ????? ???, ?? ?? ??? ????? ??? ?? ??????? ,?????? , ???????? ?????:
Field: DatePart("yyyy",[OrderDate])
Total: Where
Criteria: 1997
Show: No
??? ??????????????? ????? ??????? recordset ?? ???? 1997 ?? ???? ???????? ???? ?? ??? ?????? ??? ?????? ??????
????? ??? ?? RunTot ????? ?? ???? ??? ?? ??? ????? ?????? ????????? ???? ??:
AYear AMonth RunTot FDate
--------------------------------------
1997 1 2238.98 Jan
1997 2 3840.43 Feb
1997 3 5729.24 Mar
1997 4 8668.34 Apr
1997 5 12129.74 May
1997 6 13982.39 Jun
1997 7 17729.29 Jul
1997 8 22204.73 Aug
1997 9 26565.26 Sep
1997 10 32031.38 Oct
1997 11 36192.09 Nov
1997 12 42748.64 Dec
???? 2 ????? ???? ?? ??? ?? ??? ?????? ?? ????? ???? ?? ??
DSum ?? ???? ?? ?? ??? ?? ??? ????? ?? ??? () ????????
????? ????? ?????? freight ?? ??? ???? ??? ?? ???? ???? ?? ??? ??? ?? ???????? ?? ????? freight ????? ??? ???? ?? ??? ' ???? ' ?????? ?? ????? ???? ??? ?????, ?? ?????? ?????, ?? ????? ?? ???? ????:
????? ??????? Northwind.mdb ?????? ???? ?? ?? ??? ???? ?????? ?????, ?? ???? ?????? ??????? ????? ????????? ???? ??,??? .???: Access 2007 ???, ????? ??????? ???????????/?????? ?? ?????????? ??? ?? ????? ????.. ?????? ?????? ????? ?? ???? ?????, ??? ???? ?? ??? ????? ????? ?????????? ????? ???, ?? ?? ??? ????? ??? ?? ??????? , ???????? ?????:
Field: EmpAlias: EmployeeID
Total: Group By
Show: Yes
?? ????? ?? groups EmployeeID ?????? ???? ??? ?????? ?????? ????? ?? ????? ?????, ??? ???? ?? ??? ????? ????? ?????????? ????? ???, ?? ?? ??? ????? ??? ?? ??????? , ???????? ?????:
Field: Freight
Total: Sum
Show: Yes
?? ????? ?? ???? freight ??? ???? ??? ?????? ?????? ????? ?? ????? ?????, ??? ????? ?????????? ??? ?????????? ????? ???, ?? ?? ??? ????? ??? ?? ??????? , ???????? ????? ???????: : ????? ?????? ???, ???? ?????? ?? ??? ??? ?? ????????? (_) ?? ???? ?? ?????? ?? ???????? ?? ??? ??? ????? ???? ???? ??? ?????? ?? ??? ?? ????????? ????? ?? ?? ?????? re-creating.
Field: RunTot: Format(DSum("Freight","Orders","[EmployeeID]<=" _
& [EmpAlias] & ""),"$0,000.00")
Total: Expression
Show: Yes
??? ??????????????? ????? ????? ??DSum () ?????? Freight ????? ?? EmployeeID ???? ???? ?? ????? ???? ?? ??? ??????? EmpAlias ??, ?? ???? ??? dollars ??? ????? ?? ??????? ???? ?? ?? ??? ???? ?? ??? ??? ?????? ??????
????? ??? ?? RunTot ????? ?? ???? ??? ?? ??? ????? ?????? ????????? ???? ??:
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
???? ???? ???? ??: Microsoft Office Access 2007 Microsoft Office Access 2003 Microsoft Access 2002 Standard Edition kbinfo kbexpertiseinter kbhowto kbmt KB290136 KbMthi
???? ?????? ???????? ??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:
290136
(http://support.microsoft.com/kb/290136/en-us/
)
Was this information helpful?
How much effort did you personally put forth to use this article?
Tell us why and what can we do to improve this information
Thank you! Your feedback is used to help us improve our support content. For more assistance options, please visit the
Help and Support Home Page .
???? ?????? ???? ?????? ??????
??????
??? ?????? ??????? ????
???? ??????