Solved Running Sum with two numeric criteria (1 Viewer)

JAQ

New member
Local time
Today, 13:50
Joined
Dec 15, 2021
Messages
9
Hi There,

Not very smart with access coding,

here is my Dsum where i stuck i need dsum with two numeric field criteria like

I have fileds like

CNNO numeric customer no field
INNO numeric invoice number field

i have created this; and working well but need customer ID (CNNO) criteria as well that will be aded as "And" but i am unable to write that

Val(DSum("[credit]","payments","inno=" & [inno]))
 

JAQ

New member
Local time
Today, 13:50
Joined
Dec 15, 2021
Messages
9
Val(DSum("[credit]","payments","inno=" & [inno]))

it was my attemp which is working but i need one more criteria with CNNO (Customer number)
 

GaP42

Active member
Local time
Today, 18:50
Joined
Apr 27, 2020
Messages
338
Try:
Val(DSum("[credit]","payments","[inno]=" & [inno] & " AND [cnno] = " & [cnno]))
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:50
Joined
Sep 21, 2011
Messages
14,301
Not sure why you feel you need the Val() function?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:50
Joined
Feb 19, 2002
Messages
43,275
You ABSOLUTELY do not need the Val() function. Val() is a string function and DSum() returns a numeric value. Val() is used to select leading numeric characters from a string.
 

Users who are viewing this thread

Top Bottom