Sum Function

  • Thread starter Thread starter Andy Jones
  • Start date Start date
A

Andy Jones

I'm after a bit of help as I'm new to using access.

I have impressed myself with designing a datase which does
what i want it to but need some help with calculations.

Lets say I have 3 fields, named:

1. Obs Needed
2. Obs Done
3. Obs Left To Do

What I need on the same form is the 3rd field, (Obs left
to do) to have a formula in it to calculate the result
from the first two fields.

eg: if:

1 = 5
2 = 2
3 = 3 (< This one should automatically be generated as a
result of 1-2)

Is this possible and how do i do it? ive tried the help in
access and just cant figure it out.

I would be grateful of any help!

Andy
 
Andy said:
I'm after a bit of help as I'm new to using access.

I have impressed myself with designing a datase which does
what i want it to but need some help with calculations.

Lets say I have 3 fields, named:

1. Obs Needed
2. Obs Done
3. Obs Left To Do

What I need on the same form is the 3rd field, (Obs left
to do) to have a formula in it to calculate the result
from the first two fields.

eg: if:

1 = 5
2 = 2
3 = 3 (< This one should automatically be generated as a
result of 1-2)

Is this possible and how do i do it? ive tried the help in
access and just cant figure it out.

I would be grateful of any help!

Andy

I am not sure what you are doing so please excuse me if I am answering
the wrong question.

When you say fields, do you mean fields that are in a table somewhere?

If the fields exist in a table and if the results field is always the
result, that is you would not want it to stay the same for some reason as
you changed one of the two other fields; you are braking a primary database
rule. Never store the result of a calculation. Calculate results as
needed, don't store them.

While there are a number of ways of doing it, it is easiest for most
people to use a query to provide the results and then base forms and reports
on the query rather than the table. (Note: running totals are easiest to
computer on a report.)

So make a Query based on the Table. Use all the table's fields you want
except "Obs Left To Do." Now, in design mode go to the first blank field
and type "ToDo: [Obs Needed] + [Obs Done]" without the quotes. Run the
query and you should have the results

BTW I recommend not using spaces in filed names. It can create problems
later. Not fatal, but I think you will find it less troublesome.
 
Joseph,

Thanks for that, while it's not quite what I wanted, it
does do what I want it to do and it a bit easier to report
on aswell, so thanks for telling me how to do it!

and thanks for the tip on spaces, I see what you mean when
trying to write the formula!

Thanks
-----Original Message-----
Andy said:
I'm after a bit of help as I'm new to using access.

I have impressed myself with designing a datase which does
what i want it to but need some help with calculations.

Lets say I have 3 fields, named:

1. Obs Needed
2. Obs Done
3. Obs Left To Do

What I need on the same form is the 3rd field, (Obs left
to do) to have a formula in it to calculate the result
from the first two fields.

eg: if:

1 = 5
2 = 2
3 = 3 (< This one should automatically be generated as a
result of 1-2)

Is this possible and how do i do it? ive tried the help in
access and just cant figure it out.

I would be grateful of any help!

Andy

I am not sure what you are doing so please excuse me if I am answering
the wrong question.

When you say fields, do you mean fields that are in a table somewhere?

If the fields exist in a table and if the results field is always the
result, that is you would not want it to stay the same for some reason as
you changed one of the two other fields; you are braking a primary database
rule. Never store the result of a calculation. Calculate results as
needed, don't store them.

While there are a number of ways of doing it, it is easiest for most
people to use a query to provide the results and then base forms and reports
on the query rather than the table. (Note: running totals are easiest to
computer on a report.)

So make a Query based on the Table. Use all the table's fields you want
except "Obs Left To Do." Now, in design mode go to the first blank field
and type "ToDo: [Obs Needed] + [Obs Done]" without the quotes. Run the
query and you should have the results

BTW I recommend not using spaces in filed names. It can create problems
later. Not fatal, but I think you will find it less troublesome.


--
Joseph E. Meehan

26 + 6 = 1 It's Irish Math



.
 
Andy said:
Joseph,

Thanks for that, while it's not quite what I wanted, it
does do what I want it to do and it a bit easier to report
on aswell, so thanks for telling me how to do it!

and thanks for the tip on spaces, I see what you mean when
trying to write the formula!

Thanks

I'm glad it helped
 

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

Back
Top