Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi masters ! I'am currently doing a system for application of leave(im still a student this is for assignment :) ). my only problem now is how am i going to add +1 value in all employee in the column of Vacation leave?

What i mean is, if current leave of 10 employees is they have 5 leave each, then after i add value of 1 in vl column. all 10 employee will have 6 leaves.

please see my code:



im looking for your other suggestions, Thank you and god bless to all beginners :)

End Sub

m

What I have tried:

Quote:
VB.NET
Private Sub Btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnadd.Click
    recordset.Open("Select * from table", database)

    vl = Val(txtVL.Text)
    sl = Val(txtSL.Text)
    el = Val(txtEL.Text)

    xtotalvl = recordset.Fields("Vacation_Leave").Value
    xtotalsl = recordset.Fields("Sick_Leave").Value
    xtotalel = recordset.Fields("Emergency_Leave").Value

    xtotalvl = +vl
    xtotalsl = +sl
    xtotalel = +el

    recordset.UpdateBatch()
    MsgBox("data saved")
    database.Close()
Posted
Updated 22-Dec-16 22:26pm

 
Share this answer
 
Comments
Maciej Los 23-Dec-16 3:42am    
5ed!
been looking in google quite a time :( cannot found :(
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900