B
briank
I'm trying to utilize the dsum command in my query. In this query the field
[Vendor Name] should come up with the same name. However, there are several
dates which I want the dsum to be based upon. The example below better
illustrates my intentions.
(should be)
WeekEndingDate Vendor Name PdTrimMiles WeeklyGoalMiles
10/7/2006 Lewis 1.97
0.145
10/7/2006 Lewis 5.00 0.368
10/7/2006 Lewis 6.60 0.486
10/14/2006 Lewis 3.32 0.227
10/14/2006 Lewis 5.00 0.343
10/14/2006 Lewis 6.25 0.428
WeeklyGoalMiles: IIf([Vendor Name] Like "Lewis*" And
[PaidTrimMiles]<>0,nz([PaidTrimMiles],0)/DSum("nz([PaidTrimMiles],0)","tblTreeRemovalAnalysis","[Vendor
Name] like """ & "Lewis*'" And [WeekEndingDate]=[WeekEndingDate])*37.2,Null)
The problem is that I can not seem to get this query to pull the date range
like the example above. Any thoughts?
[Vendor Name] should come up with the same name. However, there are several
dates which I want the dsum to be based upon. The example below better
illustrates my intentions.
(should be)
WeekEndingDate Vendor Name PdTrimMiles WeeklyGoalMiles
10/7/2006 Lewis 1.97
0.145
10/7/2006 Lewis 5.00 0.368
10/7/2006 Lewis 6.60 0.486
10/14/2006 Lewis 3.32 0.227
10/14/2006 Lewis 5.00 0.343
10/14/2006 Lewis 6.25 0.428
WeeklyGoalMiles: IIf([Vendor Name] Like "Lewis*" And
[PaidTrimMiles]<>0,nz([PaidTrimMiles],0)/DSum("nz([PaidTrimMiles],0)","tblTreeRemovalAnalysis","[Vendor
Name] like """ & "Lewis*'" And [WeekEndingDate]=[WeekEndingDate])*37.2,Null)
The problem is that I can not seem to get this query to pull the date range
like the example above. Any thoughts?