SELECT Sum(qryWeeklySum4cs.SumOfSumOfAmount) AS 4,
Sum(qryWeeklySum4csSetters.SumOfSumOfAmount) AS 4S,
CDbl(nz([4],0)-CDbl(nz([4s],0))) AS Expr1
FROM qryWeeklySum4cs, qryWeeklySum4csSetters;
"qryWeeklySum4cs" is what $$ is owed to me and "qryWeeklySum4csSetters" is
what $$ I owe. What I owe shows up in the Table (used in the two
subquerries) before what is owed to me. I should be seeing a negitive value
in "Expr1" instead I get "Blank" "Blank" "Zero"
Allen Browne said:
Swith the query to SQL view, and post the entire SQL statement.
I'll try to look at what you posted tomorrow. (1am here).
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
haggr said:
That didn't help ,but I can tell you understand what I am trying to do.
Also
when I use "nz" it does change to "Nz" like all other fucntions, but no
error
messages. Data Types are all the same "currency". I can't believe I am
have
so much trouble with this. It seems to be a very basic querry to write.
:
JET is likely to misunderstand the data types, so try:
CDbl(Nz([a], 0)) + CDbl(Nz(
, 0))
That's assuming that [a] and represent complete subquery statements,
and
both return a numeric field.
For more info on typecasting calculated fields, see::
Calculated fields misinterpreted
at:
http://members.iinet.net.au/~allenbrowne/ser-45.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Trying to add two subquerries in a querry. one of the subquerries
sometimes
returns no value. I still need them to add Tried "expr1: nz([a],0)
+nz(,0)". That returns zero. A is blank b is blank and expr1 is
zero
even though there is a value for b. Maybe I need to know how to make
a
querry return a zero value even thought the qerry has no value to
return.