Dale:
Thanks again for your assistance.
Unfortunately, it didn't work this time either -- similar kinds of results.
In fact, any change at all from the original expression I gave you no longer
works. I can't even substitute just the "dateadd" functions for the date()
without a malfunction, nor does anything with the "me.cboResourceName & "'"
work.
I'll continue to try to mess with it. Until then, if you have any other
inspirations, please feel free to pile on.
I'm adding some additional detail in case it is helpful. I'm adding the SQL
that comprises the "MasterFactTable" query. If I could, I'd add a picture of
the data model as well -- though that may be intuitive from the SQL.
I should add that, even though the connecting primary/foreign keys are
system generated numeric fields, the actual data for display is text (for
Resource Name, Project Name, etc. The "weekending" is a date, even though
the date table is also connected via a numeric primary/foreign key.
Herewith, the SQL:
SELECT WeekEndingDate.WeekEnding, Format(Year([weekending])) AS YearNo,
Format(Month([Weekending])) AS MonthNo, Format([Weekending],"yyyy mmmm") AS
YearMonth, DatePart("q",[Weekending]+90) AS [Fiscal Quarter], [Person
Resource].[Resource Name], Project.[Project Name], [Project
Transaction].[Week Hours Worked Qty], [Project Transaction].[Project Person
Comment]
FROM WeekEndingDate INNER JOIN (Project INNER JOIN ([Person Resource] INNER
JOIN ([Person Resource Role] INNER JOIN [Project Transaction] ON [Person
Resource Role].[Role Code]=[Project Transaction].[Person Resource Role Code])
ON [Person Resource].[Person Resource ID]=[Project Transaction].[Person
Resource ID]) ON Project.[Project ID]=[Project Transaction].[Project ID]) ON
WeekEndingDate.ID=[Project Transaction].[Week Ending Date ID]
ORDER BY WeekEndingDate.WeekEnding, [Person Resource].[Resource Name],
Project.[Project Name];
Note that not everything in the query is being used in the form. This query
was intended pull "everything" together for use by forms and reports.
Thanks again for your help.
--
Thorfinn
"Dale_Fye via AccessMonster.com" wrote:
> Try breaking up the string and putting the literal values of the date in the
> criteria of the DSUM.
>
> =DSum("[Week Hours Worked Qty]","MasterFactTable","[Weekending]
> between #" & date() & "# and #" & dateadd("d", -7, Date()) & "# AND
> [Resource Name] = '" &
> me.cboResourceName & "'")
>
> is the [ResourceName] field actually text? If so, then that part of the
> query should be correct. If, however, ResourceName actually is numeric, then
> it should read like:
>
> =DSum("[Week Hours Worked Qty]","MasterFactTable","[Weekending]
> between #" & dateadd("d", -7, Date()) & "# and #" & date() & "# AND
> [Resource Name] = '" &
> me.cboResourceName & "'")
>
> Thorfinn wrote:
> >Dale Fry:
> >
> >Additional reponse:
> >
> >I played around with the quotation marks in both your original and altered
> >forms. In each case, I get one of the following four results:
> >
> >#Name?
> >#Error
> >I get an empty expression field and a dialog box not that the syntax is wrong.
> >It reverts back to the original algorythm
> >
> >Further, the result isn't always the same with any one change. That is the
> >frustrating thing about Access -- there's some "quantum physics" that seems
> >to apply where the same string of ones and zeros (or whatever) don't equal
> >the same thing everytime. If that is true, "computer science" may be closer
> >to Taro Cards, et al.
> >
> >Anyhow -- just me whining/ranting. Please respond if there is any help.
> >
> >Thanks again,
> >> Thorfinn,
> >>
> >[quoted text clipped - 77 lines]
> >> >Thanks again
> >> >Thorfinn
>
> --
> HTH
>
> Dale Fye
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...oding/200906/1
>
>