Adding multipul fields together.

mikhl

New member
Local time
Today, 16:54
Joined
Feb 13, 2010
Messages
1
I have five fields called:


  • Job Cost 1
  • Job Cost 2
  • Job Cost 3
  • Job Cost 4
  • Job Cost 5

I have tried to add these togethet in another field with the formula:
=Sum([Job Cost 1]+[Job Cost 2]+[Job Cost 3]+[Job Cost 4]+[Job Cost 5])

as well as doing it without the 'Sum' at the beginning. I'm not sure what I am doing wrong. Any help please.

I am using Access 2007 if that makes any differece, I don't think it does.

Thanks in advance!

/*ADDED CONTENT*/
I have found that the fomula =Sum([Job Cost 1]+[Job Cost 2]) works just fine, I'm not sure why it doesn't work when I put more than two in though.
 
Last edited:
You heed to restructure your databes. The single records with multiple fields need to be expressed as multiople records in the same field. The aspect of the record which current defines the field should be sotred as another field.

eg

JobCostID | Cost
1 | 2000
1 | 3000
2 | 500

etc

What you are tring to achieve become trivial with the right structure.

BTW Drop the spaces from you field and table names. They serve no purpose and just make extra unnecassary typing because you have toe[enclose every name].
 
Any nulls involved?
try this........Nz([Field1]) + Nz([Field2])
 

Users who are viewing this thread

Back
Top Bottom