var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Inventory with MS Access 2007/2010
I am not a database guru and 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.
Unless I'm missing something, you're doing it correctly. Since the tblEmployee field vacationsaldo is storing the correct numbr AFTER the completed payment has been calculated, each time you attempt a payment, simply use that figure for the current calculations.
Is something happening to the vacationsaldo from the time you calculate it until the time you store it in tblEmployee?
thnx for your reply.
Nothing changed when the calculation happend. The vacationsaldo continued with the same value.
Do you think i should use a update query? Any other idea how to solve this
I don't understand what's not working. If it works with one payment, why shouldn't it work with multiple payments?
The [vacationsaldo] field is not being updated by the calculation.
Field [vacationsaldo] must be updated by 2 calculations: