在特定列中添加值 [英] Add value in specific column

查看:102
本文介绍了在特定列中添加值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨大师!我目前正在做一个休假申请系统(我仍然是学生,这是为了分配:))。我现在唯一的问题是如何在假期休假栏中为所有员工增加+1值?



我的意思是,如果当前请假10员工是他们每人有5个假,然后我在vl列中添加值1。所有10名员工将有6片叶子。



请看我的代码:







我正在寻找你的其他建议,感谢上帝保佑所有初学者:)



End Sub



m



我的尝试:



Quote:

 私人  Sub  Btnadd_Click( ByVal  sender 作为系统。对象 ByVal  e 作为 System.EventArgs)句柄 Btnadd.Click 
recordset.Open( 从表,数据库中选择*

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

xtotalvl = recordset.Fields( Vacation_Leave)。值
xtotalsl = recordset.Fields( Sick_Leave)。Value
xtotalel = recordset.Fields( Emergency_Leave)。价值

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

recordset.UpdateBatch()
MsgBox( 保存数据
database.Close()

解决方案

Google是你的朋友 [ ^ ]。


一直在谷歌寻找:(找不到:(

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:

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()

解决方案

Google is your friend[^].


been looking in google quite a time :( cannot found :(


这篇关于在特定列中添加值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆