No unfortunately we do not have user level security so its difficult to
identify the culprits I'm affraid.
The sql is below:
SELECT Fullname.Expr1, Sum(Incident.[Hours Missed]) AS [SumOfHours Missed],
[District Nurse].[Leave Entitlement], Sum(([Leave Entitlement])-([Hours
Missed])) AS Expr2
FROM ([District Nurse] INNER JOIN Fullname ON [District Nurse].[Staff
Number]=Fullname.[Staff Number]) INNER JOIN Incident ON [District
Nurse].[Staff Number]=Incident.[Staff Number]
WHERE (((Incident.[Leave Date])>#3/31/2005#))
GROUP BY Fullname.Expr1, [District Nurse].[Leave Entitlement],
Incident.[Staff Number], Incident.Reason
HAVING (((Incident.[Staff Number])=[Please enter staff number:]) AND
((Incident.Reason)="Annual Leave"));
Expr1 is the name for the "Fullname" field which is a concatenation of
Forename and Surname.
Jeff Boyce said:
An Input Mask should not affect the math you do on the underlying
actually-stored values.
Can you spot any differences between the customer that produce
accurate/inaccurate results?
Please post the entire SQL of the query.
Regards
Jeff Boyce
<Access MVP>
NoviceIan said:
I checked the fields data type properties meaning data type, decimal places
etc from the table design.
They both are Number, Double with two decimal places. The only difference
being the input mask of leave entitlement is 999.99 and the hours
missed
has
an additional digit before the decimal place.
Is that any clearer?
I'm not getting an error no, some employees details calculate
correctly
but
others dont for some reason. For example
One employee had 19 hours leave from a possible 202.50 the calculated field
rightly calculated that the employee has 183.50 remaining
However the second employee has taken 127.50 from a entitlement of 187.50
and the field wildly calculated 1372.50 remaining.
:
Please re-read my response -- display and formatting are not the
same as
how
the underlying fields are defined. Are you getting an error?
Jeff Boyce
<Access MVP>
Yes I checked the inderlaying table.
:
When you "check the fields", are you saying that you checked the
underlying
data in the table, or the query results?
Format concerns display, not calculation.
Regards
Jeff Boyce
<Access MVP>
Hi, I'm trying to create a query that calculates how much
annual
leave
an
employee has remaining. The expression I'm using is
Remaining: SUM ([Leave Entitlement])-[Hours Missed]
Now it seems to work for some employees but others return
results
in
the
thousends. I checked the fields themseleves and the format
for
the
fields
is:
Leave Entitlement 999.99
Hours missed 9999.99
Is the extra digit the problem here?