Fnd the sum of

J

Jan Il

Hi all - Access 2002XP, Windows Wk2

I have a form on which I am trying to display the sum of two controls,
txtExpense and txtPayments on the form.

The txtExpense control has =Sum([PurchaseAmt]) (which displays the total of
all purchases listed on the form from a control named PurchaseAmt)

The txtPayments control has =Sum([PaymentAmt]) (which is the total of all
payments listed on the form from a control named PaymentAmt)

The txtBalDue is the name of the control in which I need to show the total
balance of what is still owed between these two other controls.

I have tried =Sum([txtExpense]-[txtPayments]) in the balance control,
however, I keep getting #Error in all the controls.

I also tried =Sum([PurchaseAmt]-[PaymentAmt]) and that also gives me the
#Error in each control.

What am I missing with these calculations? I'm sure it is something simple,
but, I just can't seem to see where my mistake is.

Jan :)
Smiles are meant to be shared,
that's why they're so contagious.
 
J

Jan Il

Hey Lynn! ;-)
Try =Sum([PurchaseAmt]) - Sum([PaymentAmt])

Yeppers! That did the trick!

Thank you very much for your help, I really appreciate it. <g>

HAIW

Jan :)
Smiles are meant to be shared,
that's why they're so contagious.
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Jan Il said:
Hi all - Access 2002XP, Windows Wk2

I have a form on which I am trying to display the sum of two controls,
txtExpense and txtPayments on the form.

The txtExpense control has =Sum([PurchaseAmt]) (which displays the total of
all purchases listed on the form from a control named PurchaseAmt)

The txtPayments control has =Sum([PaymentAmt]) (which is the total of all
payments listed on the form from a control named PaymentAmt)

The txtBalDue is the name of the control in which I need to show the total
balance of what is still owed between these two other controls.

I have tried =Sum([txtExpense]-[txtPayments]) in the balance control,
however, I keep getting #Error in all the controls.

I also tried =Sum([PurchaseAmt]-[PaymentAmt]) and that also gives me the
#Error in each control.

What am I missing with these calculations? I'm sure it is something simple,
but, I just can't seem to see where my mistake is.

Jan :)
Smiles are meant to be shared,
that's why they're so contagious.
 
L

Lynn Trapp

Hey there Jan! ;-)
I'm glad it worked.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Jan Il said:
Hey Lynn! ;-)
Try =Sum([PurchaseAmt]) - Sum([PaymentAmt])

Yeppers! That did the trick!

Thank you very much for your help, I really appreciate it. <g>

HAIW

Jan :)
Smiles are meant to be shared,
that's why they're so contagious.
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Jan Il said:
Hi all - Access 2002XP, Windows Wk2

I have a form on which I am trying to display the sum of two controls,
txtExpense and txtPayments on the form.

The txtExpense control has =Sum([PurchaseAmt]) (which displays the
total
of
all purchases listed on the form from a control named PurchaseAmt)

The txtPayments control has =Sum([PaymentAmt]) (which is the total of all
payments listed on the form from a control named PaymentAmt)

The txtBalDue is the name of the control in which I need to show the total
balance of what is still owed between these two other controls.

I have tried =Sum([txtExpense]-[txtPayments]) in the balance control,
however, I keep getting #Error in all the controls.

I also tried =Sum([PurchaseAmt]-[PaymentAmt]) and that also gives me the
#Error in each control.

What am I missing with these calculations? I'm sure it is something simple,
but, I just can't seem to see where my mistake is.

Jan :)
Smiles are meant to be shared,
that's why they're so contagious.
 

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