P
Peter
DSum in Query
Hi. I think this is probably an error in my syntax and I’d really appreciate
some help please. I have a financial database that has many Tables, each
table has many fields primarily holding currency data.
I understand from research that it is incorrect to calculate and store a
‘result’ in a Table, so, I’ve created a Query in order to calculate and store
my result which is the TOTAL of all the currency fields in a given record.
From my research, I believe the best way of doing that is to add an extra
currency field to my Table so the field name is there for when I build my
query (still holding with the idea you shouldn’t store a result in the Table
itself).
I’ve entered the following formula into the Query by using the ZOOM feature
(it is entered into the filed column [WkCashInUnTOT]. The syntax looks like
this:
DSum("[WkCashInUnTOT]", "[Weekly Cash In Unrestricted Query]", "[UK Wk Num]
= '1'â€)
[WkCashInUnTOT] is the field name in the Table and is thus the column name
in my Query where I’ve entered the formula by using ZOOM.
[Weekly Cash In Unrestricted Query] is the Query name
[UK Wk Num] is the field in my Table that corresponds to a specific week of
the year (I have 52 of these, one for each week).
So you see I’m trying to Sum all fields in a given record if the UK WK Num =
1.
I’ve tried various ways of writing the above formula and keep getting error!
I’d like to think my logic is sound and that maybe the syntax is incorrect.
Hopefully you can help?
Hi. I think this is probably an error in my syntax and I’d really appreciate
some help please. I have a financial database that has many Tables, each
table has many fields primarily holding currency data.
I understand from research that it is incorrect to calculate and store a
‘result’ in a Table, so, I’ve created a Query in order to calculate and store
my result which is the TOTAL of all the currency fields in a given record.
From my research, I believe the best way of doing that is to add an extra
currency field to my Table so the field name is there for when I build my
query (still holding with the idea you shouldn’t store a result in the Table
itself).
I’ve entered the following formula into the Query by using the ZOOM feature
(it is entered into the filed column [WkCashInUnTOT]. The syntax looks like
this:
DSum("[WkCashInUnTOT]", "[Weekly Cash In Unrestricted Query]", "[UK Wk Num]
= '1'â€)
[WkCashInUnTOT] is the field name in the Table and is thus the column name
in my Query where I’ve entered the formula by using ZOOM.
[Weekly Cash In Unrestricted Query] is the Query name
[UK Wk Num] is the field in my Table that corresponds to a specific week of
the year (I have 52 of these, one for each week).
So you see I’m trying to Sum all fields in a given record if the UK WK Num =
1.
I’ve tried various ways of writing the above formula and keep getting error!
I’d like to think my logic is sound and that maybe the syntax is incorrect.
Hopefully you can help?