Runing sum in query by date

okotan

Registered User.
Local time
Yesterday, 18:37
Joined
Oct 23, 2007
Messages
15
Hello all

i want to create runingsum query by date. But getting error in query

Script : TARIH_Q: DSum("DOVIZ_BORC";"CH_HAREKET";"TARIH>#" & [TARIH] & "#")

The query show #ERROR

i need your urgent support

thanks
 
normal convention is to use comma's tather than semi colons tho' there are some language variations, which might apply to you.

And dates need to be supplied in US format of mm/dd/yyyy

so try

Script : TARIH_Q: DSum("DOVIZ_BORC","CH_HAREKET","TARIH>#" & format([TARIH],"mm/dd/yyyy") & "#")

you may also need to protect [TARIH] against nulls
 
Mr CJ

first of all thanks for your quick response. The query is runing when use "Clng" and runing sum by date. But this function doesnt work if i want to use three parameter

for example;

Criterias
1- Account number (CH_ID)
2- Curreny (DOVIZ)
3- Movement date (TARIH)


DOVIZ_BORC is debit
CH_HAREKET is table of current account


İ have wrote script as below but the debit column couldnt calculate and the query show same number in column. İ dont understand why couldnt calculate
Thanks for your support

FormatNumber(DSum("DOVIZ_BORC";"CH_HAREKET";"CH_ID=" & [CH_ID] And "DOVIZ=" & [DOVIZ] And "TARIH>=" & CLng([TARIH])))

thanks
 
I think I need to see the whole query, plus some data from your CH_HAREKET table and the result you require from your query

note longs are different data types from dates and you need to compare like for like - so perhaps

....And "clng(TARIH)>=" & CLng([TARIH])
 
personally, I wouldn't try to get a running sum in a query.

a report by all means, but you don't need it the query to get it in the report.
 
Mr. cj,

Please see attached. You can see name of column expr1 in the CH_HAREKET_1 query
 

Attachments

Users who are viewing this thread

Back
Top Bottom