Why Can't I get real Total When give Sum([])?

N

NaleeIshak

I created a Payroll and Personal System in Microsoft Access Database. but I
can not get the real total when I give to calculate Sum([]).

e.g.
in Salary Calculation:Form, there is a Calculation Table Query subform.
in Calculation Table Query subform: I made a one extra Text box to calculate
the Net Salary of that table column.
e.g.
=[FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days]
this is an extra Text box which I made for Net Salary in Cal. Table Query
subform.

I typed this " =Sum([Net Salary]) " in Form Footer of Cal. Detail Query
subform and I typed this " =[Calculation Detail Query subform].[Form]![net
salary's Name] in Form Footer and Detail of Salary Calculation Form.
But, it gives #Error

Please solve this ASAP.

Thanks.
 
T

Tom Lake

NaleeIshak said:
I created a Payroll and Personal System in Microsoft Access Database. but I
can not get the real total when I give to calculate Sum([]).

e.g.
in Salary Calculation:Form, there is a Calculation Table Query subform.
in Calculation Table Query subform: I made a one extra Text box to
calculate
the Net Salary of that table column.
e.g.
=[FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days]
this is an extra Text box which I made for Net Salary in Cal. Table Query
subform.

I typed this " =Sum([Net Salary]) " in Form Footer of Cal. Detail Query
subform and I typed this " =[Calculation Detail Query subform].[Form]![net
salary's Name] in Form Footer and Detail of Salary Calculation Form.
But, it gives #Error

Please solve this ASAP.

You can't Sum on a calculated field. Instead of =Sum([Net Salary]) you can
do this:

=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

Tom Lake
 
N

NaleeIshak

I can not get real total even I typed this order
=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])
 
N

NaleeIshak

Thanks for Mr. Tome Lake,
but I still get same #Error Massage after typed as your order.
=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])


Tom Lake said:
NaleeIshak said:
I created a Payroll and Personal System in Microsoft Access Database. but I
can not get the real total when I give to calculate Sum([]).

e.g.
in Salary Calculation:Form, there is a Calculation Table Query subform.
in Calculation Table Query subform: I made a one extra Text box to
calculate
the Net Salary of that table column.
e.g.
=[FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days]
this is an extra Text box which I made for Net Salary in Cal. Table Query
subform.

I typed this " =Sum([Net Salary]) " in Form Footer of Cal. Detail Query
subform and I typed this " =[Calculation Detail Query subform].[Form]![net
salary's Name] in Form Footer and Detail of Salary Calculation Form.
But, it gives #Error

Please solve this ASAP.

You can't Sum on a calculated field. Instead of =Sum([Net Salary]) you can
do this:

=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

Tom Lake
 
N

NaleeIshak

Thanks for Mr. Tome Lake
But I stell get same #Error massage after typed as your order.
=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])


Tom Lake said:
NaleeIshak said:
I created a Payroll and Personal System in Microsoft Access Database. but I
can not get the real total when I give to calculate Sum([]).

e.g.
in Salary Calculation:Form, there is a Calculation Table Query subform.
in Calculation Table Query subform: I made a one extra Text box to
calculate
the Net Salary of that table column.
e.g.
=[FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days]
this is an extra Text box which I made for Net Salary in Cal. Table Query
subform.

I typed this " =Sum([Net Salary]) " in Form Footer of Cal. Detail Query
subform and I typed this " =[Calculation Detail Query subform].[Form]![net
salary's Name] in Form Footer and Detail of Salary Calculation Form.
But, it gives #Error

Please solve this ASAP.

You can't Sum on a calculated field. Instead of =Sum([Net Salary]) you can
do this:

=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

Tom Lake
 
T

Tom Lake

NaleeIshak said:
Thanks for Mr. Tome Lake
But I stell get same #Error massage after typed as your order.
=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

Did you put that calculation in the form footer of the subform as required?

Tom Lake
 
N

NaleeIshak

Yes,
It's still same message even I put it in Form Footer of the subform

Tom Lake said:
NaleeIshak said:
Thanks for Mr. Tome Lake
But I stell get same #Error massage after typed as your order.
=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

Did you put that calculation in the form footer of the subform as required?

Tom Lake
 
T

Tom Lake

NaleeIshak said:
Thanks for Mr. Tome Lake
But I stell get same #Error massage after typed as your order.
=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

Did you put that calculation in the form footer of the subform as
required?

Tom Lake

Hmm. Are they all numeric fields and is [Days] > 0?

=Sum([FixedAllowance]+[FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

I added a missing [ in front of FixedIncrement

Tom Lake
 
N

NaleeIshak

Mr. Tom Lake, I am very sorry for this missing "[" in front of FixedIncrement.
But, my problem is exactly not that. There is a Form which is named Salary
Calculation. on that Form, I made Combo box for indicating Months. this
month's number of days, e.g. if it's January the days show 31. why I made
like this days because of BasicSalary should be divided with days.
I created a Days column in subform that name is Calculation Detail Query
subform.
In this Subform's Form Footer I made each total calculation:
one is "Total Fixed Amount" =Sum([FixedAllowance]+[FixedIncrement]+[Variety])
2nd. "Total Deduction" =Sum([FixedDeduction]+[VarietyDeduction])
3rd. "Total OT" =Sum([OT])
4th. "Total Net Salary =as I show before.
first three textboxes are showing correct answer
but, When I typed the 4th texbox calculation then all show this message
"#Error".
When I delete 4th Coloum calculation then other three show correct.



Tom Lake said:
Thanks for Mr. Tome Lake
But I stell get same #Error massage after typed as your order.
=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

Did you put that calculation in the form footer of the subform as
required?

Tom Lake

Hmm. Are they all numeric fields and is [Days] > 0?

=Sum([FixedAllowance]+[FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

I added a missing [ in front of FixedIncrement

Tom Lake
 
N

NaleeIshak

Mr. Tom Lake, Please see which I sent yesterday.

Tom Lake said:
Thanks for Mr. Tome Lake
But I stell get same #Error massage after typed as your order.
=Sum([FixedAllowance]+FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

Did you put that calculation in the form footer of the subform as
required?

Tom Lake

Hmm. Are they all numeric fields and is [Days] > 0?

=Sum([FixedAllowance]+[FixedIncrement]+[Variety]-[FixedDeduction]-[VarietyDeduction]+[BasicSalary]*[WorkDays]/[Days])

I added a missing [ in front of FixedIncrement

Tom Lake
 

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

Top