This is the form that I created.
Specifically, I've got problems on updating the current date, adding specified values on fields(vacation , sick, vs_total) and summing up the values to total.
I have finally finished the fill-up form of the Leave Application. Now, what I have to do is that every end of the month, employees would be given a privileged day of 1.25 on their Leave. Example John has a 77.285 days for vacation privileges and 144.323 for sick privileges, a total of 221.608. The month of April ends so, the 1.25 day privilege would be added each on their vacation and sick privileges. So John now has 78.538 for vacation and 144.573 for sick, sum up in total of 223.111. The table should then be updated containing the fields(vacation , sick and vs_total) and saves.
My idea for this is that, every 1st day of the month the 1.25 privilege on each fields: vacation and sick would be added and sum-up to total on the vs_total.
My syntax for this problem is:
If now() = Format$(DateAdd ("m",0,Now())," mmmm"+" "+"01"+","+ " yyyy") Then
vacation = vacation + 1.25
sick = sick + 1.25
vs_total = vacation + sick
I don't know how would these be applied on the table
Problem is how would I implement this on my database and the codes on VB
Specifically, I've got problems on updating the current date, adding specified values on fields(vacation , sick, vs_total) and summing up the values to total.
I have finally finished the fill-up form of the Leave Application. Now, what I have to do is that every end of the month, employees would be given a privileged day of 1.25 on their Leave. Example John has a 77.285 days for vacation privileges and 144.323 for sick privileges, a total of 221.608. The month of April ends so, the 1.25 day privilege would be added each on their vacation and sick privileges. So John now has 78.538 for vacation and 144.573 for sick, sum up in total of 223.111. The table should then be updated containing the fields(vacation , sick and vs_total) and saves.
My idea for this is that, every 1st day of the month the 1.25 privilege on each fields: vacation and sick would be added and sum-up to total on the vs_total.
My syntax for this problem is:
If now() = Format$(DateAdd ("m",0,Now())," mmmm"+" "+"01"+","+ " yyyy") Then
vacation = vacation + 1.25
sick = sick + 1.25
vs_total = vacation + sick
I don't know how would these be applied on the table
Problem is how would I implement this on my database and the codes on VB
Comment