I am scratching my head with the required quotes and parentheses.
I started with an existing working Query with Running Total
by date.
Now I need to produce a running total by quarter day, so I converted my
dates in serial increments of 6 hours intervals.
I verified that these serial dates have the expected values.
I run into repeated syntax error in the adapted Query.
'Original working Query taken as sample, where dates are in Date type.
SELECT master2.WBS AS WBSAlias, master2.[Pricing Date] AS DateAlias,
Sum(master2.amo unt) AS [Weekly Amount],
Val(DSum("[amount]","master2" ,"[WBS]= '" & [WBSAlias] & "' And
[Pricing Date]<= #" & [dateAlias] & "#")) AS [Running Sum]
FROM master2
GROUP BY master2.WBS, master2.[Pricing Date]
ORDER BY master2.WBS, master2.[Pricing Date];
'New Query adapted from previous. Now dates are Serial values.
'Syntax error in string in Query expression. Probable cause : Quotes &
Parentheses around GDate ?
SELECT Sc8T.HTRPhase AS WBSAlias, Sc8T.GDate AS DateAlias,
Sum(Sc8T.QAC) AS Amount,
Val(DSum("[QAC]","Sc8T","[HTRPhase]= '" & [WBSAlias] & "' And [GDate]<=
[dateAlias])) AS [Running Sum]
FROM Sc8T
GROUP BY Sc8T.HTRPhase, Sc8T.GDate
ORDER BY Sc8T.HTRPhase, Sc8T.GDate;
Help would be very much appreciated,
Thank you.
J.P.
I started with an existing working Query with Running Total
by date.
Now I need to produce a running total by quarter day, so I converted my
dates in serial increments of 6 hours intervals.
I verified that these serial dates have the expected values.
I run into repeated syntax error in the adapted Query.
'Original working Query taken as sample, where dates are in Date type.
SELECT master2.WBS AS WBSAlias, master2.[Pricing Date] AS DateAlias,
Sum(master2.amo unt) AS [Weekly Amount],
Val(DSum("[amount]","master2" ,"[WBS]= '" & [WBSAlias] & "' And
[Pricing Date]<= #" & [dateAlias] & "#")) AS [Running Sum]
FROM master2
GROUP BY master2.WBS, master2.[Pricing Date]
ORDER BY master2.WBS, master2.[Pricing Date];
'New Query adapted from previous. Now dates are Serial values.
'Syntax error in string in Query expression. Probable cause : Quotes &
Parentheses around GDate ?
SELECT Sc8T.HTRPhase AS WBSAlias, Sc8T.GDate AS DateAlias,
Sum(Sc8T.QAC) AS Amount,
Val(DSum("[QAC]","Sc8T","[HTRPhase]= '" & [WBSAlias] & "' And [GDate]<=
[dateAlias])) AS [Running Sum]
FROM Sc8T
GROUP BY Sc8T.HTRPhase, Sc8T.GDate
ORDER BY Sc8T.HTRPhase, Sc8T.GDate;
Help would be very much appreciated,
Thank you.
J.P.
Comment