Total of calculated field in a form

M

Microsoft

How can I get the total of a calculated field in a form
I have tried putting the textbox in the form footer but to no avail

Is there a function I could use to calculate this form total.

The problem seems to be because I am using a percentage in the calculation

Thanks
A
 
B

BruceM

How are you performing the calculation? What is the calculation?
If you are trying to find the sum of a calculated control you need to repeat
the calculation in the text box in the form footer. You cannot simply
reference the text box. If the calculation in the text box in the main part
of the form is Text1 * Text2, the text box in the footer needs to be
something like:
Sum(Text1 * Text2)
Percentage is a format, and should not affect what you are trying to do.
 
M

Microsoft

No matter what I put in the form footer it didn't give me the correct answer

The formula was:
(Qty * Cost * markup%) + Qty * Cost

I have now used a recordset clone that appears to work fine.
 
B

BruceM

Sum([Qty] * [Cost] * (1 +[markup%]), which is a simplified version of your
expression, should have worked. You should not use non-alphanumeric
characters such as a percent sign in a name, but if you use such characters
the name needs to be in brackets.
Another option would have been to use the expression as a calculated query
field, which you could have summed in the footer. You never mentioned what
mathematical operation you are trying to perform in the footer (sum,
average, or whatever), but as long as it is a function available to Access
it should work. You could also sum the numbers within a query. I can't see
how a recordsetclone will help, but if you got it working then good luck on
the rest of the project.
 

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