Friends,
I need your help.
I created a database with 2 tables and 1 query: tblPayment,tblEmployee,gryCalculation
tblPayment is updated twice in a month. every payment has his own paymentID.
I have a calculated field "ontv"(total workedhours)
I have a vacationfactor
For paymentX the employee gets (ont*vacationfactor) this field is called "per"
eg: 50*0.056= 2.8
I have a field in tblEmployee called vacationsaldo.
Every payment an Employee can use their vactionsaldo
What i want is:
On every payment the field: vacationsaldo must be: vacationsaldo + per.
If in tblPayment the field: VacationOP has a value it must be subtracted of the field vacationsaldo.
Something like this: vacationsaldo + per - VacationOP
After this formula the field vacationsaldo is uptodate.
For 1 payment it works great but what to do if the table is updated twice a month?
Eg:After payment 12 this formula is used, if i enter payment 13 this formula must be used on the up to date vacationsaldo value.
Please help?
I need your help.
I created a database with 2 tables and 1 query: tblPayment,tblEmployee,gryCalculation
tblPayment is updated twice in a month. every payment has his own paymentID.
I have a calculated field "ontv"(total workedhours)
I have a vacationfactor
For paymentX the employee gets (ont*vacationfactor) this field is called "per"
eg: 50*0.056= 2.8
I have a field in tblEmployee called vacationsaldo.
Every payment an Employee can use their vactionsaldo
What i want is:
On every payment the field: vacationsaldo must be: vacationsaldo + per.
If in tblPayment the field: VacationOP has a value it must be subtracted of the field vacationsaldo.
Something like this: vacationsaldo + per - VacationOP
After this formula the field vacationsaldo is uptodate.
For 1 payment it works great but what to do if the table is updated twice a month?
Eg:After payment 12 this formula is used, if i enter payment 13 this formula must be used on the up to date vacationsaldo value.
Please help?