如何在不使用VBA的情况下将表单输入转移到MS Access中的下一条记录 [英] How to carry over form inputs to the next record in MS Access without using VBA

查看:58
本文介绍了如何在不使用VBA的情况下将表单输入转移到MS Access中的下一条记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Access 2010构建数据库.该数据库由一名实习生定期更新,因此我试图使其尽可能简单和用户友好.我已经创建了一个用于输入记录的表格.

I am using Access 2010 to build a database. The database is updated regularly by an intern so I am trying to make it as simple and user friendly as possible. I have created a form for entering records.

这些记录是基于每分钟的信息,因此多个记录中的许多信息(例如日期,名称,类别等)都是相同的.因此,当我为下一个条目重置表格时,我希望这些更广泛的字段的内容保留下来.

These records are based on minute by minute information so much of the information - like date, name, category, etc - is the same for multiple records. Therefore, I want these broader fields' contents to carry over when I reset the form for the next entry.

这可能是一个常见问题,我已经研究了许多论坛,但没有提供有关如何在不使用任何宏或VBA的情况下完成此操作的指南.没有它可以做到吗?如果可以,怎么办?

This is probably a common question and I have researched many forums, but non provide guidance on how this can be done without the use of any macro or VBA. Can this be done without it? If so, how?

推荐答案

您需要使用VBA.其实很简单:

You need to use VBA. It's real simple though:

Private Sub Form_AfterUpdate()
   ' Add a line for each control that is to "remember" the last value entered
   ' and use that for the default value of the next new record created
   Me.[MyControlName].DefaultValue = Me.[MyControlName]

End Sub

这篇关于如何在不使用VBA的情况下将表单输入转移到MS Access中的下一条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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