Hi Tony,
I tried:
Me.#DaysLeft = Me.#DayAccumulated - Me.#DaysTaken - returns #Name? In the
Expression Builder, by default, it adds a = sign in front of the whole
formula, making it look like this: =Me.#DaysLeft: =Me.#DayAccumulated -
Me.#DaysTaken
therefore making the formula wrong.
And:
=me.#DayAccumulated-me.#DaysTaken - returns #Name?
And:
=[#DayAccumulated]-[#DaysTaken] - returns #Name? as well.
And:
=Sum([employee info]!#DayAccumulated-[employee info]!#DaysTaken) - return 0
And:
=Sum([#DayAccumulated]-[#DaysTaken]) - returns and empty field
The formula in #DayAccumulated is returning a valid number.
I'm out of ideas!!
Thanks.
--
Marg
TonyT said:
Hi again,
How did you try it, with the Me. part or without, I think (never use
Expression builder myself) you should have;
#DaysLeft: =[#DayAccumulated]-[#DaysTalen]
If you still get 0 then remove the DaysTaken half of the calculation to
check that DaysAccumulted is retuirning a valid number.
good luck,
TonyT..
:
I tried the suggested formula but it returns #Name?
FYI, I use the Expression builder to enter the formula as I'm not a
programmer.
Any other suggestions?
I wonder; since the field #DaysAccumulated is a calculated field, would that
be cause for the error?
Thanks!
--
Marg
:
Hi,
Sum is not required to carry out the calculation;
Me.#DaysLeft: =Me.#DayAccumulated - Me.#DaysTaken
the Me. part is assuming they are field names rather than dimmed variables,
if they are dimmed variables obviously remove the Me. part!
TonyT..
:
Hi,
Trying to calculated the number of vacation-days left for each employee.
The results comes up as 0 in every employee records. Why?
Fields are:
#MonthsWorked : =DateDiff("m",[Datehired],Date())
#DaysAccumulated: =[#MonthsWorked]*2.5
#DaysTaken: manual entry
and thefield where I get the wrong result:
#DaysLeft: =Sum([#DayAccumulated]-[#DaysTalen]) - this calculation is
returning 0 in every records.
THanks!