Access Form Calculations

cc109550

New member
Local time
Today, 17:37
Joined
Sep 19, 2006
Messages
2
Dear All, i have a very simple database with only one table.

The table has three values [Start], [end] and [Total].

The [start] & [end] fileds are numerical.

I am trying to get it so that i can enter the values onto a form, the two values in [start] and [end] need to be added together to give the [total] value.

I can get it to do it on the form but i don't know how i can get the record in the table to be updated.

Does anyone know if this can be done and if so could you advise me where i'm going wrong.

Any help would be most appreciated.
 
You don't need to store the total since you can calculate it any time you need it, either in your form or a query.
 
Calculation in tables

many thanks for your reply.

The only problem is that the value really does need to be stored in the table.

This is so that the values are on the reports, but it would also make it easier for other people who use the database.

I'm not even sure if it's possible but i need to be careful because it's a database which contains details of children and there relevant schools.

I see your a Stones fan - Good Effort!
 
Hi cc109550,

Neil is completely correct in his comment that you do not need to store the total. If you want a total on reports or forms etc then base those objects on a query that does the calculation for you.

You cannot get the table itself to do the calculation therefore you are asking for errors to occur should somebody change start or end in the table without doing the calulation of the total. You should not actually give users access to the tables but ensure they use only forms and reports.

I hope this helps.

from another Stones Fan!! :-)
 
just a thought

the users shouldnt really need to see the tables themselves, you should insulate them from this. Hence you show them the start end, and calculate the total for them on a form.

The problem is if you store all three, the users might change any of the 3 variables, so that the totals do not add correctly, then you have a real problem.
 
Can't help but agree with the other comments. You should always base forms or reports on queries, not tables. There are a number of reasons for this but one of them is so you can do this type of calculation.
 

Users who are viewing this thread

Back
Top Bottom