Hi All,
I Have 2 tables, 1 is main, and 2nd is paid details,
1.The main cotains
Reg Code Name Add DOJ DOB
2.Paid Details table contains,
Reg Code1 Paid Date Amount
I was Make this 2 table as relationship based on regcode,
and i was make form also like this(sub form).
But i was facing the problem in Total,
in the text box i was try lot of below formula but is not working
=Sum(Dlookup("[Amount]", "Paid Details", "[Reg Code]= '" &
[Reg Code] & "'"))
=Sum(Nz(Dlookup("[Amount]", "[Paid Details]", "[Reg Code]= '" & [Reg
Code] &
"'")))
=DSum("[Amount]", "[Paid Details]", "[Reg Code]= '" & [Reg Code] &
"'")
Regards,
deen
Uh, yes the table name needs to be in brackets, because it's got a space in
it.
A potential problem is that Amount might be Null for some value, so you
should use
=Sum(Nz(Dlookup("[Amount]", "[Paid Details]", "[Reg Code]= '" & [Reg Code] &
"'")))
However, why not just use
=DSum("[Amount]", "[Paid Details]", "[Reg Code]= '" & [Reg Code] & "'")
--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)
The table name doesn't go in brackets.
=Sum(Dlookup("[Amount]", "Paid Details", "[Reg Code]= '" &
[Reg Code] & "'"))
--
Bob Larson
Access MVP
Access World Forums Administrator
Utter Access VIP
Tutorials athttp://
www.btabdevelopment.com
"deen" wrote:
Pls Help me on this 2formula,Is not working fine can anyone help me on
this.
Reg Code Is a Text Format
=Sum(DLookUp("Amount","Paid details","Reg Code=" & nz([Reg Code] &
"")))
=Sum(Dlookup("[Amount]", "[Paid Details]", "[Reg Code]= '" &
[Reg Code] & "'"))
deen- Hide quoted text -
- Show quoted text -