Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using a chkbox to add totals 1

Status
Not open for further replies.

kpryan

Technical User
Aug 24, 2005
282
US
Hi all,
I have a continuous form where a field (AmmtRcvd) is the amount received. I also have a chkbox which when checked shows that the amount has been received.
I would like to when the chkbox is checked to add up all the Amounts received.

Ken
 
How are ya kpryan . . .

Have you tried DSum?
Code:
[blue]=DSum("[AmmtRcvd]","TableName","[CheckboxName] = True")[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Hi TheAceman1,
I do really appreciate all the help you have given to me. being a novice and still learning, its guys like you that teach us thing you don't learn at Uni.
With this code that you gave me, I am not able to get it to work.

But perhaps I did not explain myself clearly.
I have a text box which when the check box is checked then the ammountRcvd would be totaled in that text box
So in your code(=DSum("[AmmtRcvd]","TableName","[CheckboxName] = True")) where would I put this code, on the text box? Would it be in the control source of the text box, or in the condtional formating or would it be in the vba code of the checkbox?


Many Thanks,

Ken
 
kpryan . . .

Control Source! . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Hi TheAceman1,

I did as you suggested, and out the code in the Control Source.
When the form is opened the text box (Currency) actually shows the total amount that is O/S. So when the checkbox is checked nothing happens.

Ant ideas what I am doing wrong

Ken
 
Hi theAceman1,
Solved the problem works ok now

Thanks,

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top