Totals

mercury

Registered User.
Local time
Today, 01:02
Joined
Jul 17, 2004
Messages
35
Hi guys

Im having a problem with totaling values in a column.

In the column I want to total, there is an expression that goes something like this: = A*B + C*D (i'm using a textbox), this total will appear in the totals column for each row but i want to use this same column to come up with a grand total so i used this expression: =Sum([total]) but it doesnt work the text box just appears Blank does anyone have an idea why this is happening????

Mercury
 
Here is an example that I made. I made the Form Percentage from Query Percentage.

Michael
 

Attachments

Hi Michael

Thanks for your help, but the thing is i want my total to add all the totals. ;) For example in the sample database you posted, you used the three percentages to come up with the Total Percentage but what im trying to do is add all the Total percentages to come up with a Grand total. Im just using your sample database as an example. I tried it like how you suggested but it still didnt work.
 
Are you running your Form from query? If so, make the last field for expression.

For example:

Expr1: [field1]+[field2]+[field3]

I'm sure they're other ways to do it, but that how I do it. If you can't get it to work, then post your database so I can take a look at it.

Michael
 
Just a thought, your field might contain nulls, killing your formula. You can easily replace the nulls with zero using Pat H's suggestion Sum(Nz([Field]),0). I haven't tried that one yet but it looks nice & simple. In one step before summing I have been using iif([field] is null,0,[field]) to purge the dreaded nulls in similar circumstances to what you are doing. Give one or the other a go & see how it works.
 
Last edited:
Hi

I dont really understand what An60 was saying should i put that in a query or in the actual form? Anyway im posting the database so you all could take a look at what im trying to do.

There is only one form and if you scroll to the very right you will see the totaling fields.

Thanks
 

Attachments

I'm looking at your List of Supplier Query. You said you want the Total and Grand Total.

Total is going to be from what price or amount?

Grand Total is going to be from what price or amount?

Michael
 
Let me know what I did for you is what you wanted.

Michael
 

Attachments

Thanks

Thanks you so much this is exactly what i wanted :)
Mercury
 
Hi again

What you did was what i wanted but unfortunately i cant change any of the information. Everytime i try to enter information it keeps saying "The Recordset is not updateable" but when i use the form as the control source it works but the totals column isnt working. Do you have any solutions to this???

Mercury
 
Are you talking about your calculate button?

If so, what is the button for?

Michael
 
Hi

Don't worry about it i found out the problem with a little help from some friends. What happened was that the Totals(E) button in the query was clicked and was prevented me from updating informtion into the form.
Anyway thanks alot for your help Michael it was greatly appreciated. ;)

Aronda
 

Users who are viewing this thread

Back
Top Bottom