Dlookup Sum

D

deen

Hi all,

In access i have 2 table name main and paid details,


based on this table i has create the form also. bcoz the both form
have with relation ship

1. Main table contains,

RegCode Name Add DOJ DOB
001 dee sjh 2/04/89 20/08/70
002 aha try 12/10/2004 21/08/80

In this table regcode as set for primarykey


2. Paid Details Tble contains

Regcode1 paiddate amount
001 2/04/08 500
001 03/07/06 600
002 03/09/06 6000
001 14/10/01 4500
002 12/07/05 6500

in this table(paid details) lot of same regcode has been repeated.



doubt:

I already done the form creation.

but i have trouble with sum the certain values in paid details form
footer.

i need the result in form footer,in form reg code is 001 means in form
footer
text bot it show sum of 001 (5600)


i allready try below formula also but there is no reponses.



=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] &
"'")





can anyone help me on this


Am very new to access pls help me on this.

Regards,

Deen
 
D

deen

Hi

tha previous issue is sort out,i have fcing one more problem

I have doubt in access calculation,

i have table like


code amt1 amt2 balance
001 500 500 0
002 1000 700 300


i requried like this, in table only

in balance(amt1-amt2)

can any one help me on this.

regards
deen






Dsum is your answer.  Here is a link and a the code you should tryhttp://support.microsoft.com/kb/210495
Put this code in the Default Value of your textbox in the forms footer
DSum("Regcode1", "Amount", "Regcode1 = 001")
--
Please remember to mark this as answered if this solves your problem.



deen said:
In access i have 2 table name main and paid details,
based on this table i has create the form also. bcoz the both form
have with relation ship
1. Main table contains,
RegCode    Name   Add   DOJ        DOB
001         dee   sjh   2/04/89    20/08/70
002         aha   try   12/10/2004 21/08/80
In this table regcode as set for primarykey
2. Paid Details Tble contains
Regcode1    paiddate   amount
001          2/04/08    500
001          03/07/06   600
002          03/09/06   6000
001          14/10/01   4500
002          12/07/05   6500
in this table(paid details) lot of same regcode has been repeated.

I already done the form creation.
but i have trouble with sum the certain values in paid details form
footer.
i need the result in form footer,in form reg code is 001 means in form
footer
text bot it show sum of 001 (5600)
i allready try below formula also but there is no reponses.
=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] &
"'")
can anyone help me on this
Am very new to access pls help me on this.

Deen- Hide quoted text -

- Show quoted text -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top