Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

DSum Criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MH UK - 05 Jan 2006 11:40 GMT
I have a large table with a field (Mon_SO) with values of 0 or 1. There is a
row for each week number. What I would like is to sum the Mon_SO field for
the previous 3 weeks only - something like:

CSO: DSum("[MonSO] ","Table1"," [Table1]![Week] <="& ([Queries]![Query2]!
[Week]-3))

But I think the syntax is wrong. I keep getting an error message saying that
"Microsoft Access can't find the name [Queries]!.....
The end result to look like
Week, Mon_SO, CSO
1,1,1
2,1,2
3,1,3
4,0,2
5,0,1

Thanks in anticipation.
MH UK - 05 Jan 2006 11:59 GMT
I think that I have solved it using a sub-query:
CSO: (Select Sum(MonSO) from Table1 Where [WeekN] Between [Emp1].[WeekN]
and( [Emp1].[WeekN]-2);)

Though am happy to hear of any better solutions

> I have a large table with a field (Mon_SO) with values of 0 or 1. There is a
> row for each week number. What I would like is to sum the Mon_SO field for
[quoted text clipped - 14 lines]
>
> Thanks in anticipation.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.