[英]MS Access update Value as NULL
I have the following code on fieldApplicationType
我在
fieldApplicationType
上有以下代码
Private Sub fieldApplicationType_AfterUpdate()
If (Me.fieldApplicationType.Value = 200 Or Me.fieldApplicationType.Value = 300) Then
Me.fieldPrimaryBusinessFunction.Enabled = True
Else
Me.fieldPrimaryBusinessFunction.Enabled = False
End If
End Sub
What I want to be able to do is in the Else
not only do I want to disable the field (which is working) I also want to set the Value
to NULL if it isn't currently already NULL. 我想做的是在
Else
不仅要禁用该字段(正在运行),而且还希望将Value
设置为NULL(如果当前尚未为NULL)。
Doing Me.fieldPrimaryBusinessFunction.Value = Null
is not changing anything however. 正在执行
Me.fieldPrimaryBusinessFunction.Value = Null
不会更改任何内容。 fieldPrimaryBusinessFunction
is a ComboBox. fieldPrimaryBusinessFunction
是一个组合框。
The Row Source
for the ComboBox are coming from a view and Limit To List
is Yes along with Allow Value List Edits
ComboBox的
Row Source
来自视图,“ Limit To List
为“是”以及“ Allow Value List Edits
Have you tried: 你有没有尝试过:
Me.fieldPrimaryBusinessFunction.Value = Me.fieldPrimaryBusinessFunction.DefaultValue
That's assuming your default value is null. 假设您的默认值为null。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.