如何使用文本框值更新按钮单击时的表行 [英] How to update a table row on button click with text box values

查看:76
本文介绍了如何使用文本框值更新按钮单击时的表行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是Access新手,我想知道是否有人可以建议我实现这一点,我的查询是





我有一个带有文本框的表单(给出输入和显示表值),我想用文本框值更新记录的字段值

Hi Everybody,
I am new to Access, I wonder if Some one can suggest me to achieve this , My query is


I have a form with text boxes for (giving input and displaying table values), I want to update the field values of record with the text box values

推荐答案




int Row = dataGridView1.CurrentRow.Index;

dataGridView1 [0,Row] .Value = textBox1.Text;



您可以使用任何要更改该值的列索引更改dataGridView中的0参数,并且Row值为Selected Row。
Hi
int Row = dataGridView1.CurrentRow.Index;
dataGridView1[0, Row].Value = textBox1.Text;

you can change the 0 argument in the dataGridView with any column index that you want to change that's value and the Row value is Selected Row.


你好Jeo Jessi,



感谢您的回复,但我没有将数据显示为网格任何如果你不能得到我的抱歉问题正确,整行的简单更新



我已经通过在按钮点击事件下使用更新查询实现了它,SInce我是新来的Access它花了这么多我有时间想弄对不起,无论如何感谢您的回复
Hi Jeo Jessi,

Thanks for your reply but i am not displaying data as a grid any how i am sorry if you couldn't get my question properly , simple updation of entire row

I have achieved it by using update query under button click event ,SInce i am new to Access it took some time for me to figure out sorry and anyhow thanks for your reply


这篇关于如何使用文本框值更新按钮单击时的表行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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