访问 isnull 组合值

Posted

技术标签:

【中文标题】访问 isnull 组合值【英文标题】:access isnull combo value 【发布时间】:2013-07-09 18:06:42 【问题描述】:

我正在尝试检查是否为组合选择了一个值,但真正的部分(未选择任何值)抛出一个错误,指出:There is an invalid use of the . (dot) or ! operator or invalid parentheses.

If (Len(MinCombo) = 0) Then
    MsgBox "true"
Else
    MsgBox "false"
End If

I have also tried this code but it evaluates to the false part when a value is selected:

If (IsNull(MinCombo) = True) Then
    MsgBox "true"
Else
    MsgBox "false"
End If

我正在使用 MS Access Professional Plus 2010

【问题讨论】:

我刚刚检查了If Me.MinCombo.Value = vbNullString Then...,它是成功的。 仍然显示同样的错误 【参考方案1】:

我是这样走的:

Me.MinCombo.SetFocus
If (Me.MinCombo.selText ="") Then
  MsgBox "true"
Else
  MsgBox "false"
End If

【讨论】:

以上是关于访问 isnull 组合值的主要内容,如果未能解决你的问题,请参考以下文章