Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 如何将access窗体上基于数字字段的选择的组合框更改为0_.htaccess_Ms Access_Ms Access 2007_Vba - Fatal编程技术网

.htaccess 如何将access窗体上基于数字字段的选择的组合框更改为0

.htaccess 如何将access窗体上基于数字字段的选择的组合框更改为0,.htaccess,ms-access,ms-access-2007,vba,.htaccess,Ms Access,Ms Access 2007,Vba,嘿,如果有任何帮助,我们将不胜感激。谢谢 我得到了一个组合框字段=名称(txtCombo) 和一个numberField=(txtNumber) 我得到一个错误,我的代码有问题,任何帮助都将非常感谢。谢谢 Private Sub txtCombo_Click() If Me.txtCombo.Value = "Meter" Then Me.txtNumber.Value = 0 End If End Sub 错误imn我的代码: 运行时错误:“2448”您无法为对象指定值,由于此代码,我无法继

嘿,如果有任何帮助,我们将不胜感激。谢谢 我得到了一个组合框字段=名称(txtCombo) 和一个numberField=(txtNumber)

我得到一个错误,我的代码有问题,任何帮助都将非常感谢。谢谢

Private Sub txtCombo_Click()
If Me.txtCombo.Value = "Meter" Then
Me.txtNumber.Value = 0
End If
End Sub
错误imn我的代码:

运行时错误:“2448”您无法为对象指定值,由于此代码,我无法继续计算

如果我选择仪表值,它必须将txtNumber更改为0

Private Sub txtCombo_AfterUpdate()

If (Me.txtCombo.Value = "Meter") Then

Me.txtNumber.Value = "0"

End If

End Sub

如果我理解正确,如果在组合框中选择了meter,您希望将文本框值设置为0,那么这将起作用,使用此代码并将其放入组合框中的after update事件中。

txtNumber是什么类型的字段?文本还是数字?如果在0周围加上引号会发生什么?