如何通过MS Access上的表单编辑记录? [英] How to edit a record through a form on MS Access?

查看:458
本文介绍了如何通过MS Access上的表单编辑记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Microsoft Access的新手,并且在执行某些操作时遇到了麻烦。
基本上,我有一个组合框,一些文本框和一个命令按钮。

我想要做的是让用户从组合框中选择一条记录,然后填充文本框 (我已经设法做到这一点)。一旦数据加载到文本框中,我希望用户能够编辑文本框中的信息,然后按下命令按钮,以便它更新表中的记录。

解决方案

麻烦与删除。这听起来像你正在从错误的结局工作。根据表或查询创建表单,然后添加组合框以根据选择在表单上查找记录。有向导来指导你。然后,您将拥有一个标准Access表单,其中一切按预期工作。当文本框发生更改时,一旦移动到另一条记录,数据将立即更新,不需要保存,这是Access的默认设置。



如果您希望使用非标准的未绑定控件,则需要使用SQL或存储的查询进行更新。


I'm new to Microsoft Access and I'm having a trouble implementing something. Basically, I have a form with a combo box, some text boxes, and a command button.

What I want to do is have the user select a record from the combo box, which then populates the textboxes (I've already managed to do this). Once the data has loaded into the textboxes, I want the user to be able to edit the info in the textboxes, then press the command button so that it updates that record in the table.

解决方案

This looks like the same odd form where you had trouble with delete. It sounds like you are working from the wrong end. Create a form based on a table or query, then add a combobox to find records on the form based on the selection. There are wizards to guide you through. You will then have a standard Access form where everything works as expected. When textboxes are changed, the data will be updated as soon as you move to another record, there is no need for save, it is the default for Access.

If you wish to use non-standard unbound controls, you will need to update with SQL or stored queries.

这篇关于如何通过MS Access上的表单编辑记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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