Creating Calculations

  • Thread starter Thread starter Lisa
  • Start date Start date
L

Lisa

Hi,
I need help desprately. I am trying to set up a staff
database which includes annual leave records and sickness
etc. I have set up the table and the form perfectly fine
but I would like to create a claculation for the annual
leave section.

I have a field named "annual leave entitlement for the
year" and one called "days remining". I wanted the "days
Remaining" field to automatically calculate how many days
annual leave days are remaining when a user enters a day
off in the "days a/l required" field.

Its all very complicated to me but I REALLY need some
help with it. I'd be happy to send a copy of the database
to anyone who can help.

It'd be most appreciated.
Many Thanks
Lisa
 
Lisa,

You really shouldn't store the "days remaining" in a table. What happens
if someone enters 7 days, then realizes that they should have only
entered 5 days? Now the "days remaining" has been reduced by 12 days
instead of the 5 days they were actually off.

Use the DSUM() function to get the total days used and subtract from
annual leave days.

If you are still having problems, do a compact and repair, then WinZip
it and send it to me. (Zipped, it has to be under 1 MB.)


Steve
 
Back
Top