Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含两个子表单的表单,它们都是连续的。每个表单都有一个字段来接受创建记录的人的姓名。几乎每次,同一个人将创建所有记录,因此一旦设置了主记录,字段自动填充将非常方便。
我已经尝试了几种方法,但似乎没有一种方法完全正确(例如,第一个连续表单不会自动填充,因为它与主记录一起存在)。这是访问 2003。
OnCurrent、OnClick 等...
If IsNull(Me.MyField) or Me.MyField = "" Then Me.MyField = Me.Parent.MyRelatedField End If
最好在控件的更新后事件中设置控件的默认值。这意味着它将填充之前的值。
Me.SomeText.DefaultValue= """" & Me.SomeText & """" ''Text