如何从Access 2007中的表单向表中添加数据? [英] How to Add data to a Table from a form in Access 2007?

查看:132
本文介绍了如何从Access 2007中的表单向表中添加数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我希望能够在表单上设置一个按钮,点击该按钮会将该表单中的特定信息添加到表格中。

I对任何能告诉我怎么做的人来说都会很棒!我假设我必须给''文本框''一个特定的名称,但是我需要按钮的代码来搜索特定的文本框,然后将其添加到指定的表格。

非常感谢,


Tim Matthews

解决方案




我希望能够在表单上有一个按钮,单击该按钮会将该表单中的特定信息添加到表格中。

I对任何能告诉我怎么做的人来说都会很棒!我假设我必须给''文本框''一个特定的名称,但是我需要按钮的代码来搜索特定的文本框,然后将其添加到指定的表格。

非常感谢提前,


Tim Matthews



你好Tim


假设...

命令按钮名为cmdAdd

表称为测试

字段名为Field1和Field2

表单上的文本框名为textbox1(Number)和textbox2(Text)


然后按钮的代码为:

展开 | 选择 | Wrap | 行号


嗨玛丽,

感谢您的快速回复!


但是,我正在收到一个消息框:


您即将追加1行

点击后是的,您无法使用撤消命令来撤消更改。

您确定要附加所选行吗?


我点击 ;是的,但当我检查表时,信息还没有被插入。


我还有另一个问题,这个命令会将信息添加到新行中,还是会它会覆盖表中已有的信息吗?我需要它将信息添加到新行。


再次感谢,

Tim Matthews


< blockquote>好吧现在我觉得很蠢!!!!

我刚刚发现有必要点击referh按钮!!!!


对不起!


Tim


Hi,
I would like to be able to have a button on a form, that when clicked will add specific information from that form to a table.
I would be greatful to anybody who can tell me how to do this! I assume that I have to give the ''text boxes'' a specific name, but I need the code for the button that will search for that specific text box, then add it to a specified table.

Many thanks in advance,

Tim Matthews

解决方案

Hi,
I would like to be able to have a button on a form, that when clicked will add specific information from that form to a table.
I would be greatful to anybody who can tell me how to do this! I assume that I have to give the ''text boxes'' a specific name, but I need the code for the button that will search for that specific text box, then add it to a specified table.

Many thanks in advance,

Tim Matthews

Hi Tim

Assuming ...
Command button called cmdAdd
Table called Test
Fields called Field1 and Field2
Textboxes on Form called textbox1(Number) and textbox2(Text)

Then the code for the button would be:

Expand|Select|Wrap|Line Numbers


Hi Mary,
Thanks for the quick reply!

However, I''m recieving a message box:

You are about to append 1 row(s)
Once you click Yes, you can''t use the Undo command to reverse the changes.
Are you sure you want to append the selected rows?

I click "Yes", but when I check the table the information hasn''t been inserted.

I have one other question, will this command add the information into a new row, or will it overwrite the information already in the table? I need it to add the information into a new row.

Thanks again,

Tim Matthews


Well now I feel stupid!!!!
I''ve just found its necessary to click the "refersh" button!!!!

Sorry!

Tim


这篇关于如何从Access 2007中的表单向表中添加数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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