ijtzib
Posts: 24
|
Posted: 07/29/2012, 9:37 PM |
|
Hi guys...
Maybe someone can help in this one...It must be easy but I need a direction on how to accomplish this...
I have a table and two fields in dbase...
TABLE: vacationleave
FIELD: Employee_ID
FIELD: Employee_Name
FIELD: Earned_Input
FIELD: Lost_Input
and a calculated value in a label Total_Vacation_Leave in a form frm_vacationleave based on the table.
So what I want to accomplish is Available_Leave for each employee...
Which suppose to be:
the sum of Earned_Input - the sum of Lost_Input - Total_Vacation_Leave = ??Available_Leave??
Hope this is clear...
Thanks
Ijtzib
|
|
|
mamboBROWN
Posts: 1713
|
Posted: 08/24/2012, 6:15 AM |
|
ijtzib,
Where you able to figure this out or do you still need assistance?
|
|
|
Lucius
Posts: 220
|
Posted: 08/24/2012, 3:14 PM |
|
ijtzib, I would go with the event for control that should display the value (like BeforeShow), the query the 2 values you have in the DB (Earned_Input & Lost_Input ), get the last value you need for calculation (Total_Vacation_Leave from the calculation label). Afterwards it is a simple thing to calculate and display...
If you can't get the Total_Vacation_Leave value for some reason at the event you wish to display in, I would suggest to store the Total_Vacation_Leave value in session for the user or use a separate DB table which is recalculated every once in a while.
|
|
|
ijtzib
Posts: 24
|
Posted: 09/03/2012, 1:38 PM |
|
ok guys...
sorry about the late reply to this topic... had other delays...
Actually I restructured the tables here...and hence the question will change in regards to tables...I will rewrite the question and submit ASAP....
Thanks.....
ijtzib
|
|
|
|