The dates and day are coming from :
1. Starting Date(x) : The date when the member started working,
2. Adding days per month(y) : Are days that are leave days added per month to each member,
This you can easily calculate from the start date to the current date. I assume you can handle this one. Look at themonths for your calculations.
3. Present Date(z) : Is the present date,
Yes, the function Date() will return the present date4. Given Days(i) : Are days that the member take when going on leave ,
Is this a value types in, read from the DB? Either way, it gets specified somehow.5. Remain Days(j) : Are days that the member will have left after taking a leave.
Now subtract the value in #4 from the value in #2The result I want to store and desplay in field that will deplay the total leave credit days a member has on the form that will deplay his/her personal details.
From the above you have:
Total leave days accumulated
Leave days taken
Leave days left
I'd recommend storing only leave days taken. The other two can easily be calculated when you need the values.
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Please Read This
I'm having to decipher what you are asking, which means I dont understand the question fully. Please explain exactly the scenario so we are clear -- after you read the above link.
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
I assume you mean you understood my post. OK. Then you understood that
I'd recommend storing only leave days taken. The other two can easily be calculated when you need the values.
means theonly value you store in the database is the number of leave days already taken.
So, when you run the report, calculate
1) the number of leave days allowed since hire
2) subtract the number of days taken
3) display what's left as the number of days still available.
And since you have read the link, you also understand why we are not posting code... If not, I'll explain further.
Also:
I'm new with VB ...By the way, I' new with the VB.Please bear with me as I'm new in using the virtual basics.
Is there some reason you keep beating us over the head with your newness? It's not that we don't care if you're new. We will help you without you having to remind us all the time... :icon_wink:
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944