Calculations

  • Thread starter Thread starter Tracy
  • Start date Start date
T

Tracy

I have a table with 400 records that include number
fields Tuition Hours1, Tuition Hours2 and Tuition
Hours3. I would like to created a calculated field that
totals the hours in all three.
Approximately 390 records have values in Tuition Hours1,
3 in Tuition Hours2 and none in Tuition Hours3. I have
tried to create a calculated field that totals the value
for all three but it doesn't work. The statement =
[Tuition Hours1] + [Tuition Hours2] works but if I add +
[Tuition Hours3] the field remains blank.
I would like to include Tuition Hours3 now so I don't
have to check the entire table before I run a report to
confirm whether something has been added in that field.

I don't understand why the formula doesn't work. I would
appreciate any ideas anyone may have.

Thanks.
 
Tracy,

You might want to add IIF statements to check your
fields.

calcfld = IIF(isnull([Tuition Hours1]),0,[Tuition Hours1])
+ IIF(isnull([Tuition Hours2]),0,[Tuition Hours2]) + IIF
(isnull([Tuition Hours3]),0,[Tuition Hours3])
 
Les,
It worked, I can't thank you enough!!
Tracy
-----Original Message-----
Tracy,

You might want to add IIF statements to check your
fields.

calcfld = IIF(isnull([Tuition Hours1]),0,[Tuition Hours1])
+ IIF(isnull([Tuition Hours2]),0,[Tuition Hours2]) + IIF
(isnull([Tuition Hours3]),0,[Tuition Hours3])



-----Original Message-----
I have a table with 400 records that include number
fields Tuition Hours1, Tuition Hours2 and Tuition
Hours3. I would like to created a calculated field that
totals the hours in all three.
Approximately 390 records have values in Tuition Hours1,
3 in Tuition Hours2 and none in Tuition Hours3. I have
tried to create a calculated field that totals the value
for all three but it doesn't work. The statement =
[Tuition Hours1] + [Tuition Hours2] works but if I add +
[Tuition Hours3] the field remains blank.
I would like to include Tuition Hours3 now so I don't
have to check the entire table before I run a report to
confirm whether something has been added in that field.

I don't understand why the formula doesn't work. I would
appreciate any ideas anyone may have.

Thanks.

.
.
 

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