访问与表字段相关的2016表单控件 [英] Access 2016 Form Controls related to table fields
问题描述
我有一个表(tblCustomer),其中包含大约12列/字段中的客户信息。 我有2个名为LastName和LastName2的表字段。 我有一个带有2个控件的ADD表单,它们分别使用这些字段名称作为源。
客户使用此表单输入新的客户信息。
我试图实现的最终结果是LastName2自动填充客户端在Control中输入的内容姓氏   我不希望客户输入两次信息。
我有一本名为"Access 2016 Bible"的Wiley书籍。这对于按照设计构建系统非常有帮助。 我已经在其他地方寻求帮助,但无法找到我可以在桌面级别或
级别工作的解决方案。
我是全新的访问2016. 我有很多年为大型商业系统设计/开发数据库系统,我习惯于在代码级别工作,而不是IDE的所有花俏。
在我以前的代码级开发中,这很容易实现。
我相信我已经明确定义了我想要完成的简单操作。
提前感谢某人可能提供的任何帮助。
您好,
在表单级别,您可以使用LastName的AfterUpdate事件用相同的信息填充LastName2。例如:
Private Sub LastName_AfterUpdate()
Me.LastName2 = Me.LastName
End Sub但是,您能解释为什么您有两个字段用于客户的姓氏吗?
谢谢。
I have a table ( tblCustomer) with customer information in about 12 columns / fields. I have 2 table fields named LastName and LastName2. I have an ADD form with 2 Controls that use those field names as their source respectively. This form is used by the client to input new customer information.
The end result I am trying to achieve is have LastName2 automatically filled with what the client types in the Control for LastName. I do not want the client to type the info twice.
I have a Wiley book named "Access 2016 Bible" that has been very helpful in building the system as designed. I have looked in other places for help but have not be able to find a solution that I can make work at the table level or the form level.
I am brand new to Access 2016. I have many many years designing / developing data base systems for large commercial systems and I am accustomed to working at the code level and not with all the bells and whistles of an IDE. At my former code level development, this would be very simple to accomplish.
I trust I have clearly defined the simple action I am trying to complete.
Thanks in advance for any help that some one might be able to provide.
Hi,
At the Form level, you can use the AfterUpdate event of LastName to populate LastName2 with the same information. For example:
Private Sub LastName_AfterUpdate() Me.LastName2 = Me.LastName End SubHowever, can you please explain why you have two fields for the customer's last name?
Thanks.
这篇关于访问与表字段相关的2016表单控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!